diff --git a/flake8/formatting/default.py b/flake8/formatting/default.py index 95cc129..036d13f 100644 --- a/flake8/formatting/default.py +++ b/flake8/formatting/default.py @@ -29,3 +29,17 @@ class Default(base.BaseFormatter): "row": error.line_number, "col": error.column_number, } + + +class Pylint(Default): + """Pylint formatter for Flake8.""" + + error_format = '%(path)s:%(row)d: [%(code)s] %(text)s' + + def after_init(self): + """Do not check the value of --format. + + In the default formatter, this makes sense for backwards + compatibility, but it does not make sense here. + """ + pass diff --git a/setup.py b/setup.py index 2ab68dd..f8c3ff2 100644 --- a/setup.py +++ b/setup.py @@ -72,6 +72,7 @@ setuptools.setup( ], 'flake8.report': [ 'default = flake8.formatting.default:Default', + 'pylint = flake8.formatting.default:Pylint', ], }, classifiers=[