summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/source/release-notes/3.0.3.rst5
-rw-r--r--src/flake8/api/legacy.py1
2 files changed, 6 insertions, 0 deletions
diff --git a/docs/source/release-notes/3.0.3.rst b/docs/source/release-notes/3.0.3.rst
index 0f62a50..e82d85b 100644
--- a/docs/source/release-notes/3.0.3.rst
+++ b/docs/source/release-notes/3.0.3.rst
@@ -23,6 +23,9 @@
- Fix issue where users were unable to ignore plugin errors that were on
by default. (See also `GitLab#195`_)
+- Fix our legacy API StyleGuide's ``init_report`` method to actually override
+ the previous formatter. (See also `GitLab#200`_)
+
.. links
.. _GitLab#164:
@@ -35,5 +38,7 @@
https://gitlab.com/pycqa/flake8/issues/193
.. _GitLab#195:
https://gitlab.com/pycqa/flake8/issues/195
+.. _GitLab#200:
+ https://gitlab.com/pycqa/flake8/issues/200
.. _this Python bug report:
https://bugs.python.org/issue27649
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