mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-05 20:46:54 +00:00
Add a bunch more legacy API tests
This commit is contained in:
parent
8b4f12872e
commit
21a6df725b
2 changed files with 98 additions and 2 deletions
|
|
@ -115,8 +115,9 @@ class StyleGuide(object):
|
|||
|
||||
def init_report(self, reporter=None):
|
||||
"""Set up a formatter for this run of Flake8."""
|
||||
if (reporter is not None and
|
||||
not issubclass(reporter, formatter.BaseFormatter)):
|
||||
if reporter is None:
|
||||
return
|
||||
if not issubclass(reporter, formatter.BaseFormatter):
|
||||
raise ValueError("Report should be subclass of "
|
||||
"flake8.formatter.BaseFormatter.")
|
||||
self._application.make_formatter(reporter)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue