diff options
| author | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-07-19 16:26:42 +0000 |
|---|---|---|
| committer | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-07-19 16:26:42 +0000 |
| commit | 9f2eac7df13b3a37123fa80d93a8ab38e1c24e20 (patch) | |
| tree | 0d22855889bccf1c73cc3bdcb4f65ca56fe1d4ea /src | |
| parent | 9cbb31b4634897796a2a822df53ca6b4a7c7c014 (diff) | |
| parent | 21a6df725b865596e31362daf121e32c63b96a36 (diff) | |
| download | flake8-9f2eac7df13b3a37123fa80d93a8ab38e1c24e20.tar.gz | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/flake8/api/legacy.py | 5 |
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) |
