Commit graph

18 commits

Author SHA1 Message Date
Anthony Sottile
358ae85120 automatic: pyupgrade --py36-plus 2021-03-30 17:37:13 -07:00
Eric N. Vander Weele
6017022942 options: Remove parsing --verbose from the configuration file
The `--verbose` option is only used by `flake8`, itself,` when parsing
and handling preliminary options.  After parsing and merging options
from the configuration file, there is no other behavioral impact to the
core of `flake8`.  In other words, setting `verbose = ...` in a
configuration file doesn't change the logging verbosity.

While the `FileProcessor` does expose a `verbose` attribute, obtained
from the parsed options, the verbosity of the core of `flake8` should be
consistent with how a plugin may respond to the attribute's value.
2019-10-12 14:25:50 +01:00
Carl Meyer
423980164b Add paths option in local-plugins config file. 2017-10-24 19:58:18 -07:00
Carl Meyer
4e58068657 Add support for local (in-repo, non-setuptools) plugins.
Closes #357
2017-08-03 00:25:37 -07:00
Shinya Kawaguchi
98b9946a78 Reproduce quiet/verbose config problem 2017-07-22 16:18:58 +09:00
Ian Cordasco
7998734fe6
Handle SyntaxErrors after new-lines specially
In some cases, when we handle SyntaxErrors we need to ensure that the
column number is correct for a 1-indexed report. In some cases, we also
need to account for the fact that the SyntaxError has happened "after" a
new-line. To extract and alter the row and column numbers, we've moved
the logic to a private static method on the FileChecker object to avoid
an overly complex method.

Closes #237
2016-10-23 07:37:08 -05:00
Ian Cordasco
8e27f0fbcf
Add empty file as a test fixture 2016-07-09 19:41:47 -05:00
Ian Cordasco
31c32e3327
Parse hyphenated config names also
Previously Flake8 parsed both

    max-line-length = 110

And

    max_line_length = 110

From the config file without issue. When we updated our logic, I forgot
to test for that and we lost that behaviour temporarily.

Closes #152
2016-06-28 05:47:14 -05:00
Ian Cordasco
3f434f7d1c
Add broken config file to test error handling
ConfigFileFinder should absolutely handle broken/invalid config files
by refusing to try to parse them. Here we catch the ParsingError,
log the exception, and then return normally. The RawConfigParser
instance is perfectly valid still and will behave as if nothing had
been read and we just need to indicate that we didn't find any files
worthy of reading.

Related to: https://github.com/PyCQA/pycodestyle/issues/506
2016-06-16 16:19:09 -05:00
Ian Cordasco
ba7f4db7e9
Add test fixture that mirrors documented usage 2016-06-07 18:46:58 -05:00
Ian Cordasco
2cd3ac91d1
Start adding test fixture files
This adds E501 which is actually a poor test. Currently,
pep8.maximum_line_length does its own check for noqa instead of relying
on the Checker. See also: https://github.com/PyCQA/pycodestyle/pull/539
2016-06-07 18:03:58 -05:00
Ian Cordasco
9ebaa5c69c
Add tests for parse_unified_diff
We could probably use non-git diff fixtures, but those are what we have
for now.
2016-06-07 10:14:45 -05:00
Ian Cordasco
466ef2e596 Add example configuration sections to the docs
Add tests to verify our examples do not regress
2016-05-28 12:00:47 -05:00
Ian Cordasco
4e294af81c Update fixture README with descriptions 2016-01-19 06:43:47 -06:00
Ian Cordasco
d6dbf797bc Add forgotten config file fixtures 2016-01-17 13:08:52 -06:00
Ian Cordasco
ebe47ec740 Add fixture file without a flake8 section 2016-01-10 21:05:51 -06:00
Ian Cordasco
9231aae1d6 Add README to fixtures directory 2016-01-10 09:50:16 -06:00
Ian Cordasco
dd46f02b58 Add config file fixtures
Add more ConfigFileFinder tests
2016-01-09 23:02:20 -06:00