mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-13 08:04:18 +00:00
Add more to configuration documentation
This commit is contained in:
parent
a7898e0389
commit
50d74e3cce
1 changed files with 49 additions and 0 deletions
|
|
@ -27,3 +27,52 @@ Presently, Flake8 supports storing its configuration in the following places:
|
||||||
- Your top-level user directory
|
- Your top-level user directory
|
||||||
|
|
||||||
- In your project in one of ``setup.cfg``, ``tox.ini``, or ``.flake8``.
|
- In your project in one of ``setup.cfg``, ``tox.ini``, or ``.flake8``.
|
||||||
|
|
||||||
|
|
||||||
|
"User" Configuration
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Flake8 allows a user to use "global" configuration file to store preferences.
|
||||||
|
The user configuration file is expected to be stored somewhere in the user's
|
||||||
|
"home" directory.
|
||||||
|
|
||||||
|
- On Windows the "home" directory will be something like
|
||||||
|
``C:\\Users\sigmavirus24``, a.k.a, ``~\``.
|
||||||
|
|
||||||
|
- On Linux and other Unix like systems (including OS X) we will look in
|
||||||
|
``~/``.
|
||||||
|
|
||||||
|
Note that Flake8 looks for ``~\.flake8`` on Windows and ``~/.config/flake8``
|
||||||
|
on Linux and other Unix systems.
|
||||||
|
|
||||||
|
|
||||||
|
Project Configuration
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Flake8 is written with the understanding that people organize projects into
|
||||||
|
sub-directories. Let's take for example Flake8's own project structure
|
||||||
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
flake8
|
||||||
|
├── docs
|
||||||
|
│ ├── build
|
||||||
|
│ └── source
|
||||||
|
│ ├── _static
|
||||||
|
│ ├── _templates
|
||||||
|
│ ├── dev
|
||||||
|
│ ├── internal
|
||||||
|
│ └── user
|
||||||
|
├── flake8
|
||||||
|
│ ├── formatting
|
||||||
|
│ ├── main
|
||||||
|
│ ├── options
|
||||||
|
│ └── plugins
|
||||||
|
└── tests
|
||||||
|
├── fixtures
|
||||||
|
│ └── config_files
|
||||||
|
├── integration
|
||||||
|
└── unit
|
||||||
|
|
||||||
|
In the top-level ``flake8`` directory (which contains ``docs``, ``flake8``,
|
||||||
|
and ``tests``) there's also ``tox.ini`` and ``setup.cfg`` files.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue