There was a *very* subtle bug in how we handle blanket select statements
with error codes that are in our DEFAULT_IGNORE. In the specific case,
users were specifying ``--select E`` and E126 was not being properly
reported. This unveiled further logic bugs as we refined this.
Closes#318
They are equivalent for iterating so remove the additional function
call.
Pattern identified as outdated by Lennart Regebro's PyCon 2017 talk
"Prehistoric Patterns in Python"
https://www.youtube.com/watch?v=V5-JH23Vk0I
The GitLab interface links to the CONTRIBUTING.rst file
(e.g. next to the green submit button under the text box
for filing a new issue), but does not follow the symlink.
Removing the symlink in order to replace it with a file
pointing at the rendered version of the guidelines:
http://flake8.pycqa.org/en/latest/internal/contributing.html
See GitLab issue #327.
By splitting out the logic to retrieve and return the formatting class
for an application, we can test it more easily and increase our test
coverage of this critical logic.
Refs #320
When we read in a file on Python 3, we use the tokenize module to detect
the coding pragma at the top of the file. We then use that to decode the
rest of the file. However, when we were receiving stdin, we would not do
that.
This updates ``stdin_get_value`` in a backwards compatible way to check
for that coding pragma and then fall back to UTF-8 if necessary.
Closes#306
Apparently there are some cases where the git hook will not find files
to run the checks against (e.g., when amending a commit message). In
those cases, it's best not to attempt to run any checks and to allow the
hook to exit successfully.
Closes#303
When we receive a SyntaxError, it is not guaranteed to have a token that
includes the physical line causing the issue. If it does not, we now
will avoid trying to determine the number of rows and columns that are
actually there and default to what the error tells us.
Closes#279
In our setuptools integration command, we were attempting to avoid
checking each submodule in the packages list. This was done without
recognizing that two modules may start with the same prefix, e.g.,
- foo
- foo_bar
- foo_biz
In this case, we only ever checked ``foo``. By appending a '.' to the
end of each package name, we avoid this since we only care about
deduplicating submodules, e.g.,
- foo
- foo.sub
- foo.sub.sub
Closes#295