mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-09 22:34:17 +00:00
configuration.rst: Demonstrate how to set a boolean value
The example config shows how to set a string, list, and int value but does not show how to configure a Boolean value that requires True or False in a file-based config but not when done on the command line.
This commit is contained in:
parent
ed28466bae
commit
e99edeb327
1 changed files with 5 additions and 1 deletions
|
|
@ -117,6 +117,7 @@ Let's actually look at |Flake8|'s own configuration section:
|
||||||
ignore = D203
|
ignore = D203
|
||||||
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist
|
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist
|
||||||
max-complexity = 10
|
max-complexity = 10
|
||||||
|
show-source = True
|
||||||
|
|
||||||
This is equivalent to:
|
This is equivalent to:
|
||||||
|
|
||||||
|
|
@ -124,7 +125,8 @@ This is equivalent to:
|
||||||
|
|
||||||
flake8 --ignore D203 \
|
flake8 --ignore D203 \
|
||||||
--exclude .git,__pycache__,docs/source/conf.py,old,build,dist \
|
--exclude .git,__pycache__,docs/source/conf.py,old,build,dist \
|
||||||
--max-complexity 10
|
--max-complexity 10 \
|
||||||
|
--show-source
|
||||||
|
|
||||||
In our case, if we wanted to, we could also do
|
In our case, if we wanted to, we could also do
|
||||||
|
|
||||||
|
|
@ -140,6 +142,7 @@ In our case, if we wanted to, we could also do
|
||||||
build,
|
build,
|
||||||
dist
|
dist
|
||||||
max-complexity = 10
|
max-complexity = 10
|
||||||
|
show-source = True
|
||||||
|
|
||||||
This allows us to add comments for why we're excluding items, e.g.
|
This allows us to add comments for why we're excluding items, e.g.
|
||||||
|
|
||||||
|
|
@ -161,6 +164,7 @@ This allows us to add comments for why we're excluding items, e.g.
|
||||||
# This contains builds of flake8 that we don't want to check
|
# This contains builds of flake8 that we don't want to check
|
||||||
dist
|
dist
|
||||||
max-complexity = 10
|
max-complexity = 10
|
||||||
|
show-source = True
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue