⚙ How Python Tools Are Configured
There are various ways to configure python tools, config files, code, or
environment variables. Let’s look at a few projects that allow users to
configure them through the use of config files and how they do it.
Motivation # [1]
This will not include how they are implemented, I’ve looked at a few and its
not simple. This will focus on where config is placed and the order in which
duplicates are resolved.
The motivation of this article is to serve as a bit of a reference guide for
those who may want to create their own package that needs configuration.
Flake8 # [2]
Global # [3]
User settings can exist in the users ~/.config/flake8 file to configure how
flake8 runs on their machine.
- ~/.config/flake8
Per-Project # [4]
Only One project config file will be considered, but allows for several
options. These files all use the ini format and must have a [flake8]
section header to be consideered.
Selection of the config file can also be overridden by the --config cli option.
An e...