This includes creating the pool, tearing it down under normal use, and
tearing it down in case of exception.
Doing this makes it harder to leak processes, as for instance was
happening in #410.
Fixes#410
In working on flake8-json, I noticed that setting newline was only
helpful for writing to an ouput-file but not to standard-out. It makes
sense for this setting to apply to both branches otherwise plugins need
to override the method to get the behaviour they expect.
Previously we were hitting the catch-all return that decided the error
was selected. Instead, let's add specific logic since we now know how we
would hit that and we actually don't want it to be selected.
Closes#354
This was mostly to prove to myself that we could possibly reach that
return more than actually covering that return. This just shows how
gnarly this logic actually is. I wish there were a better way to write
it.
In dealing with the decision logic in the StyleGuide recently I
recognized that the logic really doesn't belong strictly on the
StyleGuide. A separate object makes perfect sense especially from the
perspective of testability. This is a minor refactor intended solely to
facilitate further testing and perhaps making the logic easier to
understand for others.
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
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
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
Some PyFlakes messages weren't covered by unique messages, making them
impossible to select/ignore. This is now fixed.
To ensure we don't regress in the future, a test has been added that fails if
there's any uncovered messages.