More flake8 cleanups

This commit is contained in:
Dirk Mueller 2019-12-10 12:41:11 +01:00
parent 10a6a78ae8
commit ad06348dcf
9 changed files with 22 additions and 16 deletions

View File

@ -1,4 +1,4 @@
[flake8] [flake8]
exclude = .open-build-service/, abichecker, openqa, openqa-maintenance.py exclude = .open-build-service/, abichecker, openqa, openqa-maintenance.py
max-line-length = 100 max-line-length = 100
ignore = E501,F401,E302,E128,E251,E201,E202,E305,F841,E261,E265,E266,E712,E401,E126,E502,E711,E125,E123,W293,W391,E101,E713,E124,E127,E701,E714,W503,W504,E129,E741,E722,E731 ignore = E501,F401,E128,E251,E201,E202,E302,E305,F841,E261,E265,E712,E126,E711,E125,E123,E101,E713,E124,E127,E701,E714,W504,E129,E741,E722,E731

View File

@ -1,7 +1,9 @@
#!/usr/bin/python3 #!/usr/bin/python3
from pprint import pprint from pprint import pprint
import os, sys, re import os
import sys
import re
import logging import logging
from optparse import OptionParser from optparse import OptionParser
import cmdln import cmdln
@ -883,10 +885,10 @@ class CommandLineInterface(cmdln.Cmdln):
if user is None and group is None: if user is None and group is None:
user = conf.get_apiurl_usr(apiurl) user = conf.get_apiurl_usr(apiurl)
return self.clazz(apiurl = apiurl, \ return self.clazz(apiurl = apiurl,
dryrun = self.options.dry, \ dryrun = self.options.dry,
user = user, \ user = user,
group = group, \ group = group,
logger = self.logger) logger = self.logger)
def do_id(self, subcmd, opts, *args): def do_id(self, subcmd, opts, *args):

View File

@ -1,7 +1,9 @@
#!/usr/bin/python3 #!/usr/bin/python3
from pprint import pprint from pprint import pprint
import os, sys, re import os
import re
import sys
import logging import logging
from optparse import OptionParser from optparse import OptionParser
import cmdln import cmdln

View File

@ -1,7 +1,9 @@
#!/usr/bin/python3 #!/usr/bin/python3
from pprint import pprint from pprint import pprint
import os, sys, re import os
import sys
import re
import logging import logging
from optparse import OptionParser from optparse import OptionParser
import cmdln import cmdln

View File

@ -138,4 +138,3 @@ class CommandLineInterface(ReviewBot.CommandLineInterface):
if __name__ == "__main__": if __name__ == "__main__":
app = CommandLineInterface() app = CommandLineInterface()
sys.exit(app.main()) sys.exit(app.main())

View File

@ -69,7 +69,7 @@ def diff(version):
if not os.path.exists(os.path.join(_dir, version)): if not os.path.exists(os.path.join(_dir, version)):
return "invalid version", 400 return "invalid version", 400
import subprocess import subprocess
cmd = [os.path.dirname(os.path.abspath(__file__)) + '/factory-package-news.py', \ cmd = [os.path.dirname(os.path.abspath(__file__)) + '/factory-package-news.py',
'diff', '--dir', _dir, "current", version] 'diff', '--dir', _dir, "current", version]
app.logger.debug(cmd) app.logger.debug(cmd)
response = make_response(subprocess.check_output(cmd)) response = make_response(subprocess.check_output(cmd))
@ -85,4 +85,3 @@ if __name__ == '__main__':
app.run(debug=options.debug, host=options.host) app.run(debug=options.debug, host=options.host)
application = app application = app

View File

@ -1,7 +1,9 @@
#!/usr/bin/python3 #!/usr/bin/python3
from pprint import pprint from pprint import pprint
import os, sys, io import io
import os
import sys
import logging import logging
from optparse import OptionParser from optparse import OptionParser
import rpm import rpm

View File

@ -42,8 +42,8 @@ class TestFactorySourceAccept(unittest.TestCase):
self.logger = logging.getLogger(__file__) self.logger = logging.getLogger(__file__)
self.logger.setLevel(logging.DEBUG) self.logger.setLevel(logging.DEBUG)
self.checker = FactorySourceChecker(apiurl = APIURL, \ self.checker = FactorySourceChecker(apiurl = APIURL,
user = 'factory-source', \ user = 'factory-source',
logger = self.logger) logger = self.logger)
self.checker.override_allow = False # Test setup cannot handle. self.checker.override_allow = False # Test setup cannot handle.

View File

@ -37,8 +37,8 @@ class TestMaintenance(unittest.TestCase):
self.logger = logging.getLogger(__file__) self.logger = logging.getLogger(__file__)
self.logger.setLevel(logging.DEBUG) self.logger.setLevel(logging.DEBUG)
self.checker = MaintenanceChecker(apiurl = APIURL, \ self.checker = MaintenanceChecker(apiurl = APIURL,
user = 'maintbot', \ user = 'maintbot',
logger = self.logger) logger = self.logger)
self.checker.override_allow = False # Test setup cannot handle. self.checker.override_allow = False # Test setup cannot handle.