Fix flake8 - Q003 Change outer quotes to avoid escaping inner quotes

This fixes CI on openSUSE Tumbleweed with last flakes and flake8-quotes
plugin
This commit is contained in:
Ondřej Súkup 2019-06-24 14:59:40 +02:00
parent 2531821f42
commit bf230d8fc6
No known key found for this signature in database
GPG Key ID: 18E6D11A219AF3B7
7 changed files with 9 additions and 9 deletions

View File

@ -52,10 +52,10 @@ def process_diff_args(argv):
options = parser.parse_args(args=argv)
# the rpms must exist for us to do anything
if not os.path.exists(options.old_package):
print(f'The file \'{options.old_package}\' does not exist')
print(f"The file '{options.old_package}' does not exist")
exit(2)
if not os.path.exists(options.old_package):
print(f'The file \'{options.new_package}\' does not exist')
print(f"The file '{options.new_package}' does not exist")
exit(2)
# convert options to dict

View File

@ -23,7 +23,7 @@ class DistributionCheck(AbstractCheck):
self.compress_ext = self.config.configuration['CompressExtension']
distribution_details_dict = {
'invalid-vendor':
'In the \'%s\' distribution, vendor should be \'%s\'.' % (self.distribution, self.vendor),
"In the '%s' distribution, vendor should be '%s'." % (self.distribution, self.vendor),
'invalid-distribution':
'The distribution value should be '' + self.distribution + ''.',

View File

@ -1055,7 +1055,7 @@ a call to ldconfig.""",
a call to install-info.""",
'postin-without-install-info':
'This package contains info files and its %post doesn\'t call install-info.',
"This package contains info files and its %post doesn't call install-info.",
'info-files-without-install-info-postun':
"""This package contains info files and provides no %postun scriptlet

View File

@ -79,7 +79,7 @@ class TagsCheck(AbstractCheck):
'not-standard-release-extension':
'Your release tag must match the regular expression ' + self.release_ext + '.',
'summary-too-long':
'The \'Summary:\' must not exceed %d characters.' % self.max_line_len,
"The 'Summary:' must not exceed %d characters." % self.max_line_len,
'description-line-too-long':
"""Your description lines must not exceed %d characters. If a line is exceeding
this number, cut it to fit in two lines.""" % self.max_line_len,

View File

@ -667,7 +667,7 @@ class Pkg(AbstractPkg):
if stat.S_ISDIR(pkgfile.mode):
pkgfile.magic = 'directory'
elif stat.S_ISLNK(pkgfile.mode):
pkgfile.magic = 'symbolic link to `%s\'' % pkgfile.linkto
pkgfile.magic = "symbolic link to `%s'" % pkgfile.linkto
elif not pkgfile.size:
pkgfile.magic = 'empty'
if (not pkgfile.magic and

View File

@ -77,7 +77,7 @@ class Spellcheck(object):
upperparts = uppername.split('-')
# In english we can have ie. django's (so ignore such words)
if lang.startswith('en'):
ups = [x + '\'S' for x in upperparts]
ups = [x + "'S" for x in upperparts]
upperparts.extend(ups)
# uppercase all ignorewords
if ignored_words:

View File

@ -37,7 +37,7 @@ def test_spellchecking():
assert not result
# english 2 typos
text = 'I don\'t think tihs tetx is correct English'
text = "I don't think tihs tetx is correct English"
result = spell.spell_check(text, 'Description({}):')
assert len(result) == 2
assert result['tihs'] == 'Description(en_US): tihs -> this, hits, ties'
@ -59,7 +59,7 @@ def test_pkgname_spellchecking():
spell = rpmlint.spellcheck.Spellcheck()
pkgname = 'python-squeqe'
text = 'This package is squeqe\'s framework helper'
text = "This package is squeqe's framework helper"
result = spell.spell_check(text, 'Description({}):', 'en_US', pkgname)
assert not result