diff options
| author | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-07-30 06:42:34 -0500 |
|---|---|---|
| committer | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-07-30 06:42:34 -0500 |
| commit | 22650e50866c4669cab01bf1933db2b87d28249d (patch) | |
| tree | 4b368bf0118cbd8e22daf1a63db732565e9dff7c /src/flake8/api | |
| parent | b02855769bcc89e9c9ad8aa84e6cfdf3fdac1f2e (diff) | |
| download | flake8-22650e50866c4669cab01bf1933db2b87d28249d.tar.gz | |
Reset Application.formatter attribute in init_report
For our Legacy API users, StyleGuide.init_report should reset the
formatter attribute before calling Application.make_formatter().
Closes #200
Diffstat (limited to 'src/flake8/api')
| -rw-r--r-- | src/flake8/api/legacy.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/flake8/api/legacy.py b/src/flake8/api/legacy.py index 8c7d337..1277460 100644 --- a/src/flake8/api/legacy.py +++ b/src/flake8/api/legacy.py @@ -120,6 +120,7 @@ class StyleGuide(object): if not issubclass(reporter, formatter.BaseFormatter): raise ValueError("Report should be subclass of " "flake8.formatter.BaseFormatter.") + self._application.formatter = None self._application.make_formatter(reporter) self._application.guide = None # NOTE(sigmavirus24): This isn't the intended use of |
