Handle EPIPE IOErrors when using more than 1 job
If someone is using flake8 and piping it to a command like `head`, the
command they are piping flake8's output too may close the pipe earlier
than flake8 expects. To avoid extraneous exception output being printed,
we now catch IOErrors and check their errnos to ensure they're something
we know we can ignore.
This also provides flexibility to add further errnos for ignoring on a
case-by-case basis.
Closes#69
See merge request !35
If someone is using flake8 and piping it to a command like `head`, the
command they are piping flake8's output too may close the pipe earlier
than flake8 expects. To avoid extraneous exception output being printed,
we now catch IOErrors and check their errnos to ensure they're something
we know we can ignore.
This also provides flexibility to add further errnos for ignoring on a
case-by-case basis.
Closes#69
Add radon to Existing Extensions section
As per the title, just a small addition do the Extensions page of the docs. Related to #73
See merge request !32
https://gitlab.com/pycqa/flake8/issues/40
* Adding an ignore option in [flake8] wasn't working because pep8.StyleGuide
turned the string sent in into a tuple, which the option parser needs to receive
as an iterable that isn't a string. Split on spaces, commas, or semicolons using
re.findall in order to get a list of error/warnings to pass to StyleGuide
properly.
* Add self to contributors
(cherry picked from commit 8f8a7d458f)
Add a note about Windows .flake8 config location
The user docs state that configuration is done in ~/.config/flake8, but on Windows it's in ~/.flake8 instead.
I updated the docs per MergeRequest #49 request.
See merge request !30
Change the git-hook ignore default to None
When ignore is an empty string, it will apparently not run any checks at
all. Using None as the default ensures that it does run the appropriate
checks.
Closes#52
See merge request !27
When ignore is an empty string, it will apparently not run any checks at
all. Using None as the default ensures that it does run the appropriate
checks.
Closes#52
Fix jobs test on Windows
Rename the test_warnings.py file to \_test_warnings.py, so that it is not discoverable by nose. Run the tests in \_test_warnings.py separately. Fixes issue pycqa/flake8#44.
See merge request !26
This test was failing on Windows, for several reasons. Number one, the paths
for the hook test were hard-coded with forward slashes as path separators. I
replaced those with calls to os.path.join. Number two, the drive letter was
getting in the way of the path manipulation. On Windows, I'm using
os.path.splitdrive to fix that.
Tox remove py25
Now maybe py25 is important to support and maybe you have a CI process that installs some older version of tox so that you can test Python 2.5, in which case you can close this, though if that's the case then maybe we should make a note of that fact and what version of tox to use, etc.
See merge request !22
os.path.relpath on Python 2.6 returns slightly different output than it
does on 2.7. Rather than try to write tests around the behaviour, it
makes sense to have a common relpath function that behaves the same on
every version.
The simpler fix is to ensure that the filename isn't the full path to
the temporary file before we check to see if it should be excluded or if
it should even match.
This also fixes a bug I found while testing the pull request in which no
files are checked.