Commit graph

2506 commits

Author SHA1 Message Date
Anthony Sottile
6f28112957 Merge branch 'keyerror_str' into 'master'
Fix type='str' optparse options

See merge request pycqa/flake8!419
2020-04-24 17:47:26 +00:00
Anthony Sottile
3b490bb3c5 Fix type='str' optparse options 2020-04-24 10:43:54 -07:00
Anthony Sottile
2cb1c65c99 Release 3.8.0.a1 2020-04-24 10:34:39 -07:00
Anthony Sottile
7319beabc2 Merge branch 'latest_pycodestyle' into 'master'
Allow the new pycodestyle alpha

See merge request pycqa/flake8!418
2020-04-24 00:59:03 +00:00
Anthony Sottile
275b2320b5 Allow the new pycodestyle alpha 2020-04-23 15:13:41 -07:00
Anthony Sottile
6efb15cecb Merge branch 'pyflakes_2_2' into 'master'
Support pyflakes 2.2.x

Closes #625

See merge request pycqa/flake8!417
2020-04-15 19:34:24 +00:00
Anthony Sottile
76eeccad89 Support pyflakes 2.2.x 2020-04-11 15:00:52 -07:00
Anthony Sottile
1be8707dc7 Merge branch 'patch-1' into 'master'
Docs: Fix typo

See merge request pycqa/flake8!416
2020-03-25 20:33:10 +00:00
Hugo
9a481c186e Fix typo 2020-03-25 20:29:47 +00:00
Anthony Sottile
eee1e7139d Merge branch 'docs-glossary-fix' into 'master'
docs: Add missing semicolon to term link

See merge request pycqa/flake8!415
2020-03-25 18:53:21 +00:00
Vilhelm Prytz
41599cb6b8
docs: Add missing semicolon to term link 2020-03-25 19:45:46 +01:00
Anthony Sottile
ec4b0f6e0b Merge branch 'tests_coverage' into 'master'
instrument coverage on tests and require 100% coverage there

See merge request pycqa/flake8!414
2020-03-23 19:35:54 +00:00
Anthony Sottile
93a17a806d instrument coverage on tests and require 100% coverage there 2020-03-23 12:15:29 -07:00
Anthony Sottile
d097d5103d Merge branch 'noqa_continuation' into 'master'
Allow noqa to apply to lines due to continuation

Closes #375

See merge request pycqa/flake8!413
2020-03-23 18:33:10 +00:00
Anthony Sottile
28797a57d8 Allow noqa to apply to lines due to continuation 2020-03-17 22:12:56 -07:00
Anthony Sottile
8f9b4931b9 Merge branch 'upgrade_pip_no_get_pip' into 'master'
Upgrade pip in gitlab ci without using get-pip.py

See merge request pycqa/flake8!411
2020-01-27 16:40:30 +00:00
Anthony Sottile
372b643a2b Upgrade pip in gitlab ci without using get-pip.py 2020-01-27 08:37:04 -08:00
Anthony Sottile
ebba642268 Merge branch 'config-appdirs' into 'master'
config: Determine path to user configuration immediately

See merge request pycqa/flake8!409
2020-01-21 02:31:37 +00:00
Eric N. Vander Weele
aab1f14375 config: Determine path to user configuration immediately
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.
2020-01-20 16:54:50 -05:00
Anthony Sottile
990adcd56e Merge branch 'config-remove-config-caching' into 'master'
config: Remove checks for configs being previously parsed

See merge request pycqa/flake8!408
2020-01-20 17:58:24 +00:00
Eric N. Vander Weele
716db1167e config: Remove checks for configs being previously parsed
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.
2020-01-20 12:53:49 -05:00
Anthony Sottile
d583f051ed Merge branch 'file_not_found_error' into 'master'
Ensure that a not-found file produces an error

Closes #600

See merge request pycqa/flake8!404
2020-01-16 22:59:38 +00:00
Anthony Sottile
6223dd8ab7 Merge branch 'document_before_after' into 'master'
document that contents may appear before/after a noqa comment

Closes #528

See merge request pycqa/flake8!407
2020-01-16 22:58:19 +00:00
Anthony Sottile
b3f54c3f12 document that contents may appear before/after a noqa comment 2020-01-16 14:55:23 -08:00
Anthony Sottile
8f9f2813c3 Merge branch 'form_feed_difference' into 'master'
split lines the same when read from stdin

Closes #270

See merge request pycqa/flake8!406
2020-01-16 22:13:26 +00:00
Anthony Sottile
32c7ebcd7b split lines the same when read from stdin 2020-01-16 14:10:33 -08:00
Anthony Sottile
14293cc973 Merge branch 'warning_contains_option' into 'master'
Fix the type= warning to contain the option name

See merge request pycqa/flake8!405
2020-01-16 20:58:19 +00:00
Anthony Sottile
f4822d8783 Fix the type= warning to contain the option name 2020-01-16 12:54:52 -08:00
Anthony Sottile
bfb79b46c8 Ensure that a not-found file produces an error
- this restores a flake8 2.x behaviour that was lost in the refactor
2020-01-16 12:53:37 -08:00
Anthony Sottile
d7f6b5d710 Merge branch 'typo_fixes' into 'master'
Some typo fixes in git hooks docs

See merge request pycqa/flake8!403
2020-01-16 19:32:05 +00:00
Sorin Sbarnea
581a8b759b Some typo fixes in git hooks docs 2020-01-16 11:28:43 -08:00
Anthony Sottile
b56c88fe65 Merge branch 'config-finder-extra-files-optional' into 'master'
config: Make ConfigFileFinder 'extra_config_files' parameter optional

See merge request pycqa/flake8!402
2020-01-13 05:31:57 +00:00
Eric N. Vander Weele
eb6698c420 config: Make ConfigFileFinder 'extra_config_files' parameter optional
This simplifies the number of required parameters needed for the
`ConfigFileFinder` object throughout the various tests.
2020-01-12 23:28:52 -05:00
Anthony Sottile
44d67e46f5 Merge branch 'config-finder-config-file' into 'master'
Determine config file override from the ConfigFileFinder object

See merge request pycqa/flake8!401
2020-01-13 04:27:45 +00:00
Eric N. Vander Weele
1e3bad20dd Remove unused 'cli_config' parameter
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.
2020-01-12 23:19:26 -05:00
Eric N. Vander Weele
77b2506071 config: Switch code paths to use 'ConfigFileFinder.config_file'
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.
2020-01-12 23:19:26 -05:00
Eric N. Vander Weele
153032f778 config: Add 'config_file' parameter to ConfigFileFinder
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.
2020-01-12 23:19:26 -05:00
Anthony Sottile
24c2693979 Merge branch 'config-remove-parent-tail-state' into 'master'
config: Remove ConfigFileFinder 'parent' and 'tail' attributes

See merge request pycqa/flake8!400
2020-01-13 04:17:23 +00:00
Anthony Sottile
8ac28d7d1d Merge branch 'config-finder-isolated-cleanup' into 'master'
application: Remove stale docstring param for `.find_plugins()`

See merge request pycqa/flake8!399
2020-01-13 04:15:13 +00:00
Eric N. Vander Weele
e887ef3317 config: Remove ConfigFileFinder 'parent' and 'tail' attributes
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.
2020-01-12 23:13:11 -05:00
Eric N. Vander Weele
98d3d50295 tests: Ensure patched os.getcwd() is an absolute path
`os.getcwd()` returns an absolute path; thus, the patched paths should
be absolute as well.

This is an incremental change towards removing the `ConfigFileFinder`
attributes `.parent` and `.tail` to be localized to
`.generate_possible_local_files()`.  Without this, the tests fail when
moving the patching because `os.path.abspath()` calls `os.getcwd()`,
expecting `os.getcwd()` to be an absolute path.
2020-01-12 23:13:04 -05:00
Eric N. Vander Weele
3010ab3fbd application: Remove stale docstring param for .find_plugins()
The 'ignore_config_files' parameter was accidentally not removed in
c918e72.
2020-01-12 15:19:07 -08:00
Anthony Sottile
a5aa81e875 Merge branch 'config-finder-isolated' into 'master'
Determine config isolation from the ConfigFileFinder object

See merge request pycqa/flake8!398
2020-01-08 17:50:57 +00:00
Eric N. Vander Weele
c918e72496 Remove unused 'isolated' parameter
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.
2020-01-07 13:14:34 -05:00
Eric N. Vander Weele
3d546d448a config: Switch code paths to use 'ConfigFileFinder.ignore_config_files'
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.
2020-01-07 13:03:34 -05:00
Eric N. Vander Weele
a5c17c1a19 config: Add 'ignore_config_files' parameter to ConfigFileFinder
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.
2020-01-07 12:54:47 -05:00
Anthony Sottile
4395b05605 Merge branch 'config-read-varargs' into 'master'
config: Change ConfigFileFinder._read_config() to accept variadic args

See merge request pycqa/flake8!397
2020-01-07 03:26:26 +00:00
Eric N. Vander Weele
1a4060cd5f config: Change ConfigFileFinder._read_config() to accept variadic args
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.
2020-01-06 22:23:12 -05:00
Anthony Sottile
20906d4304 Merge branch 'aggregator-config-isolated-fix' into 'master'
aggregator: Forward  --config and --isolated options during aggregation

Closes #605

See merge request pycqa/flake8!395
2019-12-30 00:20:42 +00:00
Eric N. Vander Weele
738c8490ec tests: Add integration tests for --config and --isolated
Prevent regressions by adding integration tests to ensure that these
options are passed through to `aggregator.aggregate_options()`.
2019-12-29 19:17:31 -05:00