diff options
| author | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-02-07 10:45:19 -0600 |
|---|---|---|
| committer | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-02-07 10:45:19 -0600 |
| commit | b8a38c2573eb00f30a563ee233050ae0b5db1842 (patch) | |
| tree | a6f473b6b6e2b63e185e361544ff4629a3467bc3 | |
| parent | 2fc853b7726c5fa917adba6e64bd0d62d461d3d3 (diff) | |
| download | flake8-b8a38c2573eb00f30a563ee233050ae0b5db1842.tar.gz | |
Add pylint formatter
| -rw-r--r-- | flake8/formatting/default.py | 14 | ||||
| -rw-r--r-- | setup.py | 1 |
2 files changed, 15 insertions, 0 deletions
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 @@ -72,6 +72,7 @@ setuptools.setup( ], 'flake8.report': [ 'default = flake8.formatting.default:Default', + 'pylint = flake8.formatting.default:Pylint', ], }, classifiers=[ |
