summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | upgrade black and run via pre-commitAnthony Sottile2020-08-272-3/+7
|/
* Release 3.8.33.8.3Anthony Sottile2020-06-081-1/+1
|
* Help clarify the option behaviourmsmetko2020-06-071-1/+1
|
* fix JobsArgument --help outputRuairidh MacLeod2020-06-051-0/+4
|
* processor: Catch SyntaxError also when generating tokens for a fileEric N. Vander Weele2020-06-021-1/+1
| | | | | `tokenize.generate_tokens()` can also raise `SyntaxError` in addition to `tokenize.TokenError`.
* Release 3.8.23.8.2Anthony Sottile2020-05-222-4/+2
|
* treat --extend-exclude as a file listAnthony Sottile2020-05-211-0/+1
|
* config: Normalize paths in CLI-specified config relative to config dirEric N. Vander Weele2020-05-181-1/+1
| | | | | | | | Paths specified in configuration files should be relative to the directory where the configuration file resides. Formerly, paths were normalized relative to the current working directory where `flake8` was invoked. The former behavior was not expected, especially for directory structures with subprojects each having their own configuration.
* config: Normalize paths in config relative to provided parent directoryEric N. Vander Weele2020-05-181-4/+7
| | | | | | This sets things up to support normalizing paths relative to parent directories specified by callers who have more context for determining what paths should be relative to.
* Parse --jobs as a custom argparse type. Fixes #567Ruairidh MacLeod2020-05-132-9/+24
|
* Manager.run_parallel: Remove useless sort by (column, column)Anders Kaseorg2020-05-121-3/+1
| | | | | | Manager.report later sorts the results correctly by (line, column). Signed-off-by: Anders Kaseorg <andersk@mit.edu>
* Release 3.8.13.8.1Anthony Sottile2020-05-111-1/+1
|
* options: Forward `--output-file` to be reparsed for BaseFormatterEric N. Vander Weele2020-05-111-1/+6
| | | | | | | | | This fixes a regression introduced in daca2c8 and b14d47b. The --output-file` option was consumed by the preliminary option parser. However, the `BaseFormatter` class needs the option for setting the output filename. This special cases this option to ensure it gets re-parsed and respected when specified on the CLI.
* Release 3.8.03.8.0Anthony Sottile2020-05-111-1/+1
|
* Merge branch 'exclude_dotfiles' into 'master'Anthony Sottile2020-05-071-1/+1
|\ | | | | | | | | | | | | Fix using --exclude=.* to not match `.` and `..` Closes #632 See merge request pycqa/flake8!424
| * Fix using --exclude=.* to not match `.` and `..`Anthony Sottile2020-05-071-1/+1
| |
* | Fix logical checks which report position out of boundsAnthony Sottile2020-05-071-2/+6
|/
* Add deprecation message for git hookAnthony Sottile2020-04-271-0/+11
|
* Release 3.8.0a23.8.0a2Anthony Sottile2020-04-241-1/+1
|
* Fix type='str' optparse optionsAnthony Sottile2020-04-241-0/+2
|
* Release 3.8.0.a13.8.0a1Anthony Sottile2020-04-241-1/+1
|
* Support pyflakes 2.2.xAnthony Sottile2020-04-111-0/+16
|
* Allow noqa to apply to lines due to continuationnoqa_continuationAnthony Sottile2020-03-172-20/+54
|
* config: Determine path to user configuration immediatelyEric N. Vander Weele2020-01-201-17/+18
| | | | | | | | | | | | | | | Preemptively determine the path of the user configuration file during the construction of the `ConfigFileFinder` object. The user configuration path will always be the same, regardless of when it gets obtained by a run of `flake8`. This isolates the logic of determining the user configuration path into a static helper method to be called to set the `.user_config_file` attribute. The helper method leverages `utils.is_windows()`, instead of reimplementing the check, and decomposes clearly the directory name and the base name to construct the path with a single `return` path. Additionally, this avoids reconstructing the path on demand of obtaining the user configuration file path.
* config: Remove checks for configs being previously parsedEric N. Vander Weele2020-01-201-30/+13
| | | | | | Remove the checks to see if a configuration file has already been seen and parsed. These checks aren't necessary because the entire run of `flake8` calls these methods *only* once per configuration provided.
* Merge branch 'file_not_found_error' into 'master'Anthony Sottile2020-01-161-5/+4
|\ | | | | | | | | | | | | Ensure that a not-found file produces an error Closes #600 See merge request pycqa/flake8!404
| * Ensure that a not-found file produces an errorAnthony Sottile2020-01-161-5/+4
| | | | | | | | - this restores a flake8 2.x behaviour that was lost in the refactor
* | Merge branch 'form_feed_difference' into 'master'Anthony Sottile2020-01-162-16/+20
|\ \ | | | | | | | | | | | | | | | | | | split lines the same when read from stdin Closes #270 See merge request pycqa/flake8!406
| * | split lines the same when read from stdinAnthony Sottile2020-01-162-16/+20
| |/
* | Fix the type= warning to contain the option nameAnthony Sottile2020-01-161-1/+2
|/
* config: Make ConfigFileFinder 'extra_config_files' parameter optionalEric N. Vander Weele2020-01-121-3/+4
| | | | | This simplifies the number of required parameters needed for the `ConfigFileFinder` object throughout the various tests.
* Remove unused 'cli_config' parameterEric N. Vander Weele2020-01-124-29/+13
| | | | | | Now that `ConfigFileFinder.config_file` attribute is used everywhere and is constructed from the `--config` CLI option, the now unused `cli_config` parameters can be safely removed.
* config: Switch code paths to use 'ConfigFileFinder.config_file'Eric N. Vander Weele2020-01-121-7/+7
| | | | | | | | Now that the `ConfigFileFinder` has the `.config_file` attribute, switch the relevant code paths to utilize this public attribute. Tests have been updated to either construct `ConfigFileFinder` or mock the object appropriately.
* config: Add 'config_file' parameter to ConfigFileFinderEric N. Vander Weele2020-01-122-3/+13
| | | | | | | | | The `--config` flag is passed into `MergedConfigParser.parse()` and the module-level function `config.get_local_plugins()`. Since both of these places utilize the `ConfigFileFinder` object and the configuration file override pertains to how configuration behaves, this incremental change directly associates the `ConfigFileFinder` and the configuration file override.
* Merge branch 'config-remove-parent-tail-state' into 'master'Anthony Sottile2020-01-131-4/+1
|\ | | | | | | | | config: Remove ConfigFileFinder 'parent' and 'tail' attributes See merge request pycqa/flake8!400
| * config: Remove ConfigFileFinder 'parent' and 'tail' attributesEric N. Vander Weele2020-01-121-4/+1
| | | | | | | | | | | | | | These attributes are only needed within the `.generate_possible_local_files()` method. Therefore, just obtain the current working directory at the beginning of the method and reduce the lifetime state of the `ConfigFileFinder` object.
* | application: Remove stale docstring param for `.find_plugins()`Eric N. Vander Weele2020-01-121-3/+0
|/ | | | | The 'ignore_config_files' parameter was accidentally not removed in c918e72.
* Remove unused 'isolated' parameterEric N. Vander Weele2020-01-074-42/+14
| | | | | | Now that `ConfigFileFinder.ignore_config_files` attribute is used everywhere and is constructed from the `--isolated` CLI option, the now unused `isolated` parameters can be safely removed.
* config: Switch code paths to use 'ConfigFileFinder.ignore_config_files'Eric N. Vander Weele2020-01-071-2/+2
| | | | | | | | | Now that the `ConfigFileFinder` has the `.ignore_config_files` attribute, switch the relevant code paths to utilize this public attribute. Tests have been updated to either construct `ConfigFileFinder` or mock the object appropriately.
* config: Add 'ignore_config_files' parameter to ConfigFileFinderEric N. Vander Weele2020-01-072-3/+12
| | | | | | | | | The `--isolated` flag is passed into `MergedConfigParser.parse()` and the module-level function `config.get_local_plugins()`. Since both of these places utilize the `ConfigFileFinder` object and isolation pertains to how the `ConfigFileFinder` should behave with respect to isolation, this incremental change more directly associates the `ConfigFileFinder` and configuration file isolate.
* config: Change ConfigFileFinder._read_config() to accept variadic argsEric N. Vander Weele2020-01-061-6/+6
| | | | | | | | | | | | | This simplifies `._read_config()` by removing a conditional branch in the situation where it is called with one file to process. Now the contract accepts any number of arguments of the same type. Where callers invoke `._read_config()` with a `Sequence`, the call site has been changed to unpack arguments (i.e., `*`). The tests in `test_merged_config_parser.py` needed to return a string for the user configuration path instead of an empty list since `ConfigFileFinder.user_config_file()` returns a string.
* aggregator: Forward --config and --isolated options during aggregationEric N. Vander Weele2019-12-293-12/+41
| | | | | | | | | | | | | | This fixes a regression introduced in !346 to ensure that `--config` and `--isolated` are recognized in `aggregate_options()`. The regression manifested because `aggregate_options()` was relying on re-parsing `argv` to obtain the option values. However, !346 changed the preliminary parsing logic to only parse and "eat" what is necessary and forward along the options needed before all the configuration was loaded. This code path was overlooked because the tests in `test_aggregator()` were passing but the call from the `Application` object would never have these options in the remaining `argv` list to be passed long.
* application: Inline creation of config.ConfigFileFinderEric N. Vander Weele2019-12-033-22/+6
| | | | | | Simplify the initialization code path by invoking `config.ConfigFileFinder` directly instead of the extra hop by calling the static class-level `Application.make_config_finder()` method.
* Merge branch 'fix/disable_noqa' into 'master'Anthony Sottile2019-12-031-1/+4
|\ | | | | | | | | | | | | `--disable-noqa` does not override `# flake8: noqa` Closes #590 See merge request pycqa/flake8!380
| * Fix codesByeonghoon Yoo2019-11-061-5/+4
| |
| * Fix lint errorByeonghoon Yoo2019-11-051-1/+2
| |
| * Fix should_ignore_file() to handle disable-noqa configurationByeonghoon Yoo2019-11-051-1/+1
| |
| * Add disable_noqa attribute to FileProcessorByeonghoon Yoo2019-11-051-0/+3
| |
* | Fix typosBrian Wignall2019-12-021-2/+2
| |
* | Merge branch 'fix/exit-zero' into 'master'Anthony Sottile2019-12-021-1/+3
|\ \ | | | | | | | | | | | | Fix --exit-zero when --diff is empty See merge request pycqa/flake8!391