mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Compatibility with the latest flake8 (#2373)
Require flake8 at least 3.0.0 and just call main()
This commit is contained in:
@@ -93,12 +93,10 @@ class Flake8(_Command):
|
||||
return [package for package in self.package_files()] + ['tests', 'setup.py']
|
||||
|
||||
def run(self):
|
||||
from flake8.main import application
|
||||
from flake8.main.cli import main
|
||||
|
||||
logging.getLogger().setLevel(logging.ERROR)
|
||||
flake8 = application.Application()
|
||||
flake8.run(self.targets())
|
||||
flake8.exit()
|
||||
main(self.targets())
|
||||
|
||||
|
||||
class PyTest(_Command):
|
||||
|
||||
Reference in New Issue
Block a user