mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-05 12:36:54 +00:00
Merge branch 'legacy-api-tests' into 'master'
Add Legacy API unit tests *Description of changes* Add unit tests around the legacy API. *Related to:* n/a See merge request !76
This commit is contained in:
commit
9f2eac7df1
2 changed files with 148 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