Commit graph

22 commits

Author SHA1 Message Date
Albert Tugushev
48b2919130 Display list of available formatters with help for --format 2022-10-15 15:39:05 -04:00
Anthony Sottile
e94fb10940 require python>=3.7 2022-08-05 19:51:08 -04:00
Anthony Sottile
c5225db626 simplify decision engine
- not specified codes (cmdline / config) are now known as being implicit via
  None sentinel
- removed redundant logic for (explicit, explicit) selection
2022-03-22 18:22:20 -07:00
Anthony Sottile
f98d52a398 have OptionManager take plugin versions directly 2021-12-08 15:49:17 -05:00
Anthony Sottile
65c893728e refactor and simplify configuration loading 2021-11-22 19:45:17 -05:00
Anthony Sottile
8d3afe40e1 use return value of parse_args directly 2021-11-14 15:39:14 -08:00
Anthony Sottile
af1668bf04 extend black formatting to tests as well 2021-04-18 09:23:48 -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
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
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
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
a90200353e application: Register preliminary options on a separate argument parser
We introduce a new `ArgumentParser` for registering the preliminary
options to be inherited by the `Application.option_manager`.  The next
step will be to use the `Application.prelim_arg_parser` for parsing and
handling preliminary options and arguments.

Note that we prevent the preliminary parser from handling `-h/--help`
and defer to that to the primary parser.
2019-10-25 17:07:43 -04:00
Eric N. Vander Weele
2a5c2bb696 options: Split-out registration of preliminary options
This is in preparation for having separate `ArgumentParser`s for
preliminary and the remaining options.
2019-10-25 17:07:43 -04:00
Eric N. Vander Weele
584402fa1c config: Remove args parameter from ConfigFileFinder.__init__
Now that `args` parameters is not being used, it is safe to remove from
the constructor signature.

Further work is required to evaluate and clean-up tearing out the
threading-through of `args` from various callers and tests.
2019-10-13 13:37:19 -04: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
8bc76f79de
Configure flake8-import-order to use Google Style
This relies on two things:

1. Properly configuring flake8-import-order to use that style
2. Properly configuring flake8-import-order to know that flake8 is our
   application name.
2016-06-17 10:26:36 -05:00
Ian Cordasco
84456866a5
Fix integration tests 2016-06-14 08:03:48 -05:00
Ian Cordasco
4c0b1cd5e1
Fix tests broken by updating the default ignore list 2016-06-07 18:46:43 -05:00
Ian Cordasco
de9f56addf Fix import ordering in test files 2016-02-25 14:41:37 -06:00
Ian Cordasco
17a7826dc7 Add integration tests for aggregate_options 2016-01-24 22:14:36 -06:00