summaryrefslogtreecommitdiff
path: root/src/flake8/api
Commit message (Collapse)AuthorAgeFilesLines
* com2annAnthony Sottile2021-03-301-1/+1
|
* automatic: pyupgrade --py36-plusAnthony Sottile2021-03-301-3/+3
|
* upgrade black and run via pre-commitAnthony Sottile2020-08-271-1/+2
|
* Remove unused 'cli_config' parameterEric N. Vander Weele2020-01-121-2/+3
| | | | | | 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.
* Remove unused 'isolated' parameterEric N. Vander Weele2020-01-071-8/+5
| | | | | | 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.
* aggregator: Forward --config and --isolated options during aggregationEric N. Vander Weele2019-12-291-1/+6
| | | | | | | | | | | | | | 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-031-1/+3
| | | | | | 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.
* application: Remove configuration finder stateEric N. Vander Weele2019-11-221-3/+5
| | | | | | | 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.
* application: Change `make_config_finder` to be a pure static methodEric N. Vander Weele2019-11-061-1/+3
| | | | | This change makes `Application.make_config_finder` to be side-effect free where it its return value is only determined by its input values.
* application: Rename prelim parsing method to 'parse_preliminary_options'Eric N. Vander Weele2019-11-031-4/+1
| | | | | | Positional arguments are not used nor parsed for pre-configuration loading. Thus, renaming the method and updating the docstrings appropriately.
* Reformat with black >= 19.10b0Eric N. Vander Weele2019-11-011-3/+4
| | | | | This resets the `black` formatting baseline so it doesn't get picked up in future commits.
* application: Forward remaining unknown arguments to final CLI parsingEric N. Vander Weele2019-10-251-2/+2
| | | | | | | | Now that `parse_preliminary_options_and_args()` ignores unknown options and arguments, forward the remaining unknown arguments to the main CLI and configuration method to be consumed. This prevents re-parsing the entire `argv` list again by forwarding the remaining arguments left to be consumed.
* application: Remove forwarding unused preliminary argumentsEric N. Vander Weele2019-10-131-1/+1
| | | | | | The `ConfigFileFinder` doesn't utilize the preliminary arguments (i.e., the file names) anymore for computing the starting path for the configuration file search.
* application: Pass prelim opts to `.find_plugins()`Eric N. Vander Weele2019-10-011-1/+1
| | | | | | The configuration file and boolean to ignore configuration files can be threaded through now that `.parse_preliminary_options_and_args()` returns options and arguments.
* application: Pass prelim opts and args to `.make_config_finder()`Eric N. Vander Weele2019-10-011-1/+1
| | | | | | 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`.
* application: Pass returned prelim options to `.configure_logging()`Eric N. Vander Weele2019-10-011-3/+3
| | | | | | 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.
* move from optparse to argparseAnthony Sottile2019-08-171-2/+3
|
* Fix legacy api invocation of make_notifierAnthony Sottile2019-01-301-1/+0
|
* Use black to reformat Flake8Ian Stapleton Cordasco2018-10-201-9/+14
| | | | | Instead of just using Flake8 and pylint to keep Flake8 clean, let's also use black to make it less manual for clean-up.
* Add support for local (in-repo, non-setuptools) plugins.Carl Meyer2017-08-031-0/+5
| | | | Closes #357
* Fix docstring violationsIan Cordasco2017-05-121-3/+3
|
* Recreate file_checker_manager since it has references to old ↵Philip Witty2016-12-151-0/+2
| | | | style_guide/formatter.
* Spelling fixesVille Skyttä2016-08-131-1/+1
|
* Reset Application.formatter attribute in init_reportIan Cordasco2016-07-301-0/+1
| | | | | | | For our Legacy API users, StyleGuide.init_report should reset the formatter attribute before calling Application.make_formatter(). Closes #200
* Add a bunch more legacy API testsIan Cordasco2016-07-191-2/+3
|
* Use raw strings for docstringIan Cordasco2016-07-141-1/+1
|
* Document Legacy APIIan Cordasco2016-07-141-1/+13
|
* Fix up docstrings and __all__ in api.legacyIan Cordasco2016-07-141-2/+17
| | | | | | If users do `from flake8.api.legacy import *` we only want them to get get_style_guide imported. The other classes are not meant to be created by users.
* Run the individual methods in Application#initializeIan Cordasco2016-07-141-1/+10
| | | | | | | | | | | | We need to initialize part of the Application so we can set options passed by the user, but we also want to delay making things, e.g., - Formatter - Style Guide - etc. Until we have the options solidified so we don't have to do annoying things.
* Use statistics in the legacy report classIan Cordasco2016-07-121-1/+6
|
* Handle kwargs passed to get_style_guidebackwards-compat-apiIan Cordasco2016-07-071-0/+10
|
* Fill in most of the legacy APIIan Cordasco2016-07-073-52/+142
| | | | | This does not handle setting custom options via the parameters to get_style_guide.
* Add the skeleton for the LegacyStyleGuideIan Cordasco2016-06-301-0/+47
|
* Move flake8 into srcIan Cordasco2016-06-251-0/+10
This is an emerging best practice and there is little reason to not follow it