Commit graph

1339 commits

Author SHA1 Message Date
Ian Stapleton Cordasco
0239f15dcc
Release v3.4.0 2017-07-27 18:57:29 -05:00
Ian Stapleton Cordasco
69eaa28da2
Update name across the project post-marriage 2017-07-27 18:47:38 -05:00
Ian Stapleton Cordasco
a0dabc1d42
Merge branch 'fix-quiet' 2017-07-27 18:44:39 -05:00
Shinya Kawaguchi
55e85b4b50
Fix quiet/verbose config problem 2017-07-27 18:44:08 -05:00
Ian Cordasco
1bd88848ce Merge branch 'fix-metadata' into 'master'
Use extras_require instead of conditional code.

See merge request !191
2017-07-27 23:39:08 +00:00
Ian Cordasco
98cf75922f Merge branch 'patch-1' into 'master'
Removed unused imported module `os` from flake8.main.git._HOOK_TEMPLATE

See merge request !194
2017-07-27 11:47:05 +00:00
Ayman Nedjmeddine
43e2648ac3 Removed unused imported module os form flake8.main.git._HOOK_TEMPLATE 2017-07-27 10:59:49 +00:00
Shinya Kawaguchi
98b9946a78 Reproduce quiet/verbose config problem 2017-07-22 16:18:58 +09:00
Zvezdan Petkovic
a7068ad374 Use extras_require instead of conditional code.
Use of extras_require produces correct package metadata for flake8
regardless of the version of Python the package is built with.
The conditional code produces different metadata for Python 3 and 2.
The latest versions of flake8 were released with Python 3 and metadata
did not contain two dependencies necessary for use with Python 2.7.

See https://gitlab.com/pycqa/flake8/issues/341 for details.

Account for users of setuptools<18 that still need the conditional code.
2017-07-10 18:20:49 -07:00
Ian Cordasco
01f8824490 Merge branch 'refactor-decision-engine' into 'master'
Refactor decision logic into its own object

See merge request !190
2017-06-04 20:11:32 +00:00
Ian Cordasco
ff07ca3ed9
Add some better comments for decision logic 2017-06-04 15:07:10 -05:00
Ian Cordasco
e8c6a1e2f5
Get *one* more line of test coverage
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.
2017-06-04 14:51:01 -05:00
Ian Cordasco
86e1fb6e64
Pull decision making out of decision_for
Also, this further highlights why naming methods is so hard. I can't
think of a better name for 'more_specific_decision_for' that isn't
wildly long and unnecessarily verbose.
2017-06-04 14:50:20 -05:00
Ian Cordasco
3921afccff
Update internal documentation around StyleGuide 2017-06-04 13:43:26 -05:00
Ian Cordasco
92c367dee4
Rename style_guide.Error to style_guide.Violation
Move all Violation related methods from the StyleGuide to our Violation
class.
2017-06-04 07:57:28 -05:00
Ian Cordasco
65107a5624
Rename methods on the new DecisionEngine
Rename `decision_for` to `more_specific_decision_for` and
`should_report_error` to `decision_for`.
2017-06-03 19:20:46 -05:00
Ian Cordasco
583fda7a70
Move unit tests for StyleGuide decision logic
Convert it to test the DecisionEngine class directly and put them in
their own file.
2017-06-02 19:16:28 -05:00
Ian Cordasco
7fef0af0f5
Refactor decision logic into its own object
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.
2017-06-01 20:36:37 -05:00
Ian Cordasco
feec0754bd
Add debugging utility for FileChecker 2017-06-01 20:06:34 -05:00
Ian Cordasco
68c6577564 Merge branch 'bug/333' into 'master'
Add documentation for using --select and --ignore seperately and together

See merge request !188
2017-05-30 01:28:01 +00:00
Ian Cordasco
1827b8cc82
Add way to get back to options index 2017-05-29 20:24:30 -05:00
Ian Cordasco
d411ced0f6
Start writing new documentation around --select
In order to write this documentation, we need to also add documentation
for the --max-complexity option which was heretofore undocumented.
2017-05-29 20:23:51 -05:00
Ian Cordasco
fec980a856 Merge branch 'bug/318' into 'master'
Further improve our handling of --select and --ignore

Closes #318

See merge request !187
2017-05-28 01:41:13 +00:00
Ian Cordasco
aefa79535f
Simplify conditoinal in decision logic
Add test to cover branch of decision logic we were not previously
exercising
2017-05-27 20:34:04 -05:00
Ian Cordasco
178092954d
Add extra test cases for violation decisions 2017-05-27 20:16:15 -05:00
Ian Cordasco
72a6425ad3
Add release note for bug 318 2017-05-27 19:39:33 -05:00
Ian Cordasco
804eef4368
Upgrade dependencies when dogfooding 2017-05-27 19:31:10 -05:00
Ian Cordasco
2baaf00e83
Further refine our logic handling selection
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
2017-05-27 19:22:38 -05:00
Ian Cordasco
ec5405d2a8 Merge branch 'keys' into 'master'
Prefer iter(dict) instead of dict.keys()

See merge request !186
2017-05-27 22:54:55 +00:00
Jon Dufresne
db4f71288e Prefer iter(dict) instead of dict.keys()
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
2017-05-27 11:54:06 -07:00
Ian Cordasco
d890b8b683 Merge branch 'bug/329' into 'master'
Avoid bugs when users accidentally forget a comma

Closes #329

See merge request !185
2017-05-26 01:27:13 +00:00
Ian Cordasco
eec60cf40f
Add release note for bug 329 2017-05-25 20:08:59 -05:00
Ian Cordasco
a42299d008
Support spaces as error/ignore code separators
Closes #329
2017-05-25 20:07:48 -05:00
Ian Cordasco
a36d44a70d
Add release notes for bug 330 2017-05-25 20:07:23 -05:00
Ian Cordasco
c1f1ea019e Merge branch 'contribs' into 'master'
Replace CONTRIBUTING.rst with link to webpage

See merge request !183
2017-05-22 21:02:35 +00:00
Ian Cordasco
24129d846c Merge branch 'bug/330' into 'master'
Filter out empty ignore/select codes

Closes #330

See merge request !184
2017-05-21 01:34:34 +00:00
Ian Cordasco
25566468a2
Filter out empty ignore/select codes
When we parse out our comma separated lists, we should ignore empty
strings to avoid them breaking users' expectations.

Closes #330
2017-05-20 20:26:27 -05:00
peterjc
ba8f36cd57 Add CONTRIBUTING.rst file refering to webpage.
See discusion on GitLab issue #327 where this was suggested
by Ian Cordasco.
2017-05-15 11:09:07 +01:00
peterjc
91dcd3e4c2 Remove CONTRIBUTING.rst symlink
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.
2017-05-15 11:04:19 +01:00
Ian Cordasco
deb4936f5d Merge branch 'comprehensions' into 'master'
Clean up some uses of set, list, and dict

See merge request !181
2017-05-13 22:32:31 +00:00
Jon Dufresne
541bac6a82 Clean up some uses of set, list, and dict
* Use set literals instead of set([...])
* Avoid list(sorted(...)) as sorted returns a list
* Replace dict() with dict literal
2017-05-13 07:14:41 -07:00
Ian Cordasco
23b1f37ffd Merge branch 'bug/320' into 'master'
Handle older versions of setuptools than we expect

Closes #320

See merge request !182
2017-05-13 13:07:05 +00:00
Ian Cordasco
c62de6acc3
Make formatting plugin logic easier to test
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
2017-05-13 08:00:43 -05:00
Ian Cordasco
15ddc3aa2e
Handle missing default formatter
In the event that we cannot load our plugins, we shouldn't raise a
cryptic KeyError from our formatter.

Closes #320
2017-05-13 06:52:08 -05:00
Ian Cordasco
b6c0cce3e6
Add lower bound on setuptools
Partial #320
2017-05-12 20:37:16 -05:00
Ian Cordasco
32f4b65b6b
Fix docstring violations 2017-05-12 20:34:15 -05:00
Ian Cordasco
0e9bbab551 Merge branch 'patch-1' into 'master'
Note about error behaviour depending on Python version, e.g. F812

See merge request !180
2017-05-13 01:14:17 +00:00
Peter Cock
180196f281 Note about error behaviour depending on Python version, e.g. F812 2017-04-26 10:57:33 +00:00
Ian Cordasco
5218099504 Merge branch 'less_greedy_exclude_313' into 'master'
Don't apply excludes greedily to subdirs

Closes #313

See merge request !178
2017-04-22 13:37:00 +00:00
Anthony Sottile
0559e0b43c Don't apply excludes greedily to subdirs 2017-03-16 13:44:33 -07:00