Re-allow for relative paths for exclude

Previously, all testing was done from the directory in which the
configuration file lived, so this bug went unnoticed. However, if you
run Flake8 against its own source from a directory above, you would
notice that the patterns in the exclude config value in tox.ini were
ignored. This is because we (like any reasonable person) are using
relative paths. The path is relative, however, to the directory in
which the configuration file was located. So we keep track of which
directory that is and use that to normalize the paths in the config
file.

Yes, there is an unrelated change to our tox.ini in this commit as
well. ;-)

Closes #194
This commit is contained in:
Ian Cordasco 2016-07-29 19:27:06 -05:00
parent e619fd3b20
commit 63f5f15068
No known key found for this signature in database
GPG key ID: 656D3395E4A9791A
4 changed files with 34 additions and 15 deletions

16
tox.ini
View file

@ -138,10 +138,18 @@ commands =
# Once Flake8 3.0 is released and in a good state, we can use both and it will
# work well \o/
ignore = D203
# NOTE(sigmavirus24): Once we release 3.0.0 this exclude option can be specified
# across multiple lines. Presently it cannot be specified across multiple lines.
# :-(
exclude = .tox,.git,__pycache__,docs/source/conf.py,build,dist,tests/fixtures/*,*.pyc,*.egg-info,./.cache,./.eggs
exclude =
.tox,
.git,
__pycache__,
docs/source/conf.py,
build,
dist,
tests/fixtures/*,
*.pyc,
*.egg-info,
.cache,
.eggs
max-complexity = 10
import-order-style = google
application-import-names = flake8