summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan Cordasco <graffatcolmingov@gmail.com>2016-07-19 11:12:51 -0500
committerIan Cordasco <graffatcolmingov@gmail.com>2016-07-19 11:12:51 -0500
commit21a6df725b865596e31362daf121e32c63b96a36 (patch)
tree20a712314b4ba44d082f6c8893245b51184efe26 /src
parent8b4f12872e871c287864ee4563c18b4499b8b652 (diff)
downloadflake8-21a6df725b865596e31362daf121e32c63b96a36.tar.gz
Add a bunch more legacy API tests
Diffstat (limited to 'src')
-rw-r--r--src/flake8/api/legacy.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/flake8/api/legacy.py b/src/flake8/api/legacy.py
index 0aec7d9..8c7d337 100644
--- a/src/flake8/api/legacy.py
+++ b/src/flake8/api/legacy.py
@@ -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)