mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-10 23:04:18 +00:00
Reorganize our Application flow
This commit is contained in:
parent
189faf68ba
commit
6eb3dee1df
1 changed files with 14 additions and 3 deletions
|
|
@ -255,6 +255,18 @@ class Application(object):
|
||||||
checker_plugins=self.check_plugins,
|
checker_plugins=self.check_plugins,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def run_checks(self):
|
||||||
|
# type: () -> NoneType
|
||||||
|
"""Run the actual checks with the FileChecker Manager."""
|
||||||
|
self.file_checker_manager.start()
|
||||||
|
self.file_checker_manager.run()
|
||||||
|
self.file_checker_manager.stop()
|
||||||
|
|
||||||
|
def report_errors(self):
|
||||||
|
# type: () -> NoneType
|
||||||
|
"""Report all the errors found by flake8 3.0."""
|
||||||
|
self.file_checker_manager.report()
|
||||||
|
|
||||||
def run(self, argv=None):
|
def run(self, argv=None):
|
||||||
# type: (Union[NoneType, List[str]]) -> NoneType
|
# type: (Union[NoneType, List[str]]) -> NoneType
|
||||||
"""Run our application."""
|
"""Run our application."""
|
||||||
|
|
@ -265,9 +277,8 @@ class Application(object):
|
||||||
self.make_notifier()
|
self.make_notifier()
|
||||||
self.make_guide()
|
self.make_guide()
|
||||||
self.make_file_checker_manager()
|
self.make_file_checker_manager()
|
||||||
self.file_checker_manager.start()
|
self.run_checks()
|
||||||
self.file_checker_manager.run()
|
self.report_errors()
|
||||||
self.file_checker_manager.stop()
|
|
||||||
|
|
||||||
|
|
||||||
def main(argv=None):
|
def main(argv=None):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue