Commit graph

32 commits

Author SHA1 Message Date
Anthony Sottile
0d667a7329 enable multiprocessing on other platforms 2022-10-26 22:23:02 -07:00
Anthony Sottile
e94fb10940 require python>=3.7 2022-08-05 19:51:08 -04:00
Anthony Sottile
f0f71fc179 remove unused parameter from make_formatter 2022-01-23 19:33:21 -05:00
Anthony Sottile
d03b9c97cc add a --require-plugins option 2022-01-22 14:08:32 -05:00
Anthony Sottile
78b2db4072 type the rest of the legacy api 2022-01-05 12:35:38 -05:00
Anthony Sottile
a8333e2bf2 move managing of off_by_default / enable_extensions to plugin loading 2022-01-01 18:33:07 -05:00
Anthony Sottile
77a054688b refactor run_checks to not take an Optional list of filenames 2021-11-25 15:45:01 -05:00
Anthony Sottile
65c893728e refactor and simplify configuration loading 2021-11-22 19:45:17 -05:00
Anthony Sottile
af1668bf04 extend black formatting to tests as well 2021-04-18 09:23:48 -07:00
Anthony Sottile
358ae85120 automatic: pyupgrade --py36-plus 2021-03-30 17:37:13 -07:00
Anthony Sottile
14857c98e0 fix test which was not testing anything 2021-01-07 08:57:13 -08:00
Anthony Sottile
2fe70dda6b fix a few small spelling issues
found via `pre-commit try-repo https://github.com/codespell-project/codespell --all-files`
2020-09-20 19:16:10 -07:00
Anthony Sottile
93a17a806d instrument coverage on tests and require 100% coverage there 2020-03-23 12:15:29 -07: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
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
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
7f9f70064c aggregator: Forward --config and --isolated options during aggregation
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.
2019-12-29 18:07:51 -05:00
Eric N. Vander Weele
9fa5663986 application: Inline creation of config.ConfigFileFinder
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.
2019-12-03 13:21:01 -05:00
Eric N. Vander Weele
594c16abb4 application: Remove configuration finder state
This change removes the `.config_finder` object from the `Application`.
Since the configuration finder is only needed during initialization, we
constrain the finder to be returned and passed to other methods
necessary for initialization.
2019-11-22 11:04:40 -05:00
Eric N. Vander Weele
d75088b199 application: Change make_config_finder to be a pure static method
This change makes `Application.make_config_finder` to be side-effect
free where it its return value is only determined by its input values.
2019-11-06 12:18:15 +08:00
Eric N. Vander Weele
1abe1d42c2 application: Rename prelim parsing method to 'parse_preliminary_options'
Positional arguments are not used nor parsed for pre-configuration
loading.  Thus, renaming the method and updating the docstrings
appropriately.
2019-11-03 01:34:38 +08:00
Eric N. Vander Weele
66f832d291 application: Remove forwarding unused preliminary arguments
The `ConfigFileFinder` doesn't utilize the preliminary arguments (i.e.,
the file names) anymore for computing the starting path for the
configuration file search.
2019-10-13 13:37:19 -04:00
Eric N. Vander Weele
b54164f916 application: Remove preliminary argument parsing state
The preliminary options and arguments returned from
`.parse_preliminary_options_and_args()` are now all threaded through to
the appropriate methods during initialization.
2019-10-01 08:48:18 +02:00
Eric N. Vander Weele
95a88e3fcd application: Pass prelim opts to .find_plugins()
The configuration file and boolean to ignore configuration files can be
threaded through now that `.parse_preliminary_options_and_args()`
returns options and arguments.
2019-10-01 08:48:18 +02:00
Eric N. Vander Weele
32ebb4fa55 application: Pass prelim opts and args to .make_config_finder()
Now that `.parse_preliminary_options_and_args()` returns options and
arguments, the boolean for appending configuration and the arguments can
be threaded through to the creation of the `ConfigFileFinder`.
2019-10-01 08:48:18 +02:00
Eric N. Vander Weele
55ef2c6f5e application: Pass returned prelim options to .configure_logging()
The verbosity and output file options can be obtained from options
returned by `.parse_preliminary_options_and_args()`, instead of state
from the `Application` object.
2019-10-01 08:48:18 +02:00
Anthony Sottile
137b45ac2f Fix legacy api invocation of make_notifier 2019-01-30 11:00:36 -08:00
Ian Stapleton Cordasco
d6ab32112f
Fix issue with pep8-naming 2018-05-20 10:46:13 -05:00
Carl Meyer
4e58068657 Add support for local (in-repo, non-setuptools) plugins.
Closes #357
2017-08-03 00:25:37 -07:00
Ian Cordasco
21a6df725b
Add a bunch more legacy API tests 2016-07-19 11:12:51 -05:00
Ian Cordasco
8b4f12872e
Add more simple tests for the legacy api 2016-07-16 21:06:27 -05:00
Ian Cordasco
6e3107001f
Begin adding tests for the Legacy API 2016-07-16 20:27:07 -05:00