Skip to content
Commit aab1f143 authored by Eric N. Vander Weele's avatar Eric N. Vander Weele
Browse files

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.
parent 990adcd5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment