mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-30 10:46:54 +00:00
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. |
||
|---|---|---|
| .. | ||
| fixtures | ||
| integration | ||
| unit | ||
| __init__.py | ||
| conftest.py | ||