Commit graph

586 commits

Author SHA1 Message Date
Ian Cordasco
e2d6f33151 Fix AttributeError referring to enabled_extensions
Release v2.5.4
2016-02-11 11:53:44 -06:00
Ian Cordasco
1845ec33ec Bump version for 2.5.3 and update changes 2016-02-11 11:20:49 -06:00
Ian Cordasco
7d40f525f0 Definitely fix bug reading options from config files
Previously we were not reading output_file or enable_extensions from
user provided configuration files. The configuration option name
provided to config_options needs to be hyphenated in order for pep8 to
recognize and parse out the option correctly. Also, the destination name
needs to match the configuration option name that pep8 looks for
otherwise it will raise an unhandled KeyError exception.
2016-02-11 09:41:14 -06:00
Ian Cordasco
388db0d811 Bump version to 2.5.2
Record changes

Bump cap on mccabe
2016-01-30 08:51:42 -06:00
Ian Cordasco
3bbb337810 Add output_file and enable_extensions to config opts 2016-01-30 08:51:42 -06:00
Ian Cordasco
606f41c074 Merge branch 'fix-tests' into 'master'
On Python 2.6 TestCase.assertRaises is not a context manager



See merge request !51
2015-12-30 21:14:49 +00:00
Ian Cordasco
ebcf3493ec On Python 2.6 TestCase.assertRaises is not a context manager 2015-12-30 15:09:37 -06:00
Ian Cordasco
0f5961bf08 Merge branch 'doctest_inc_exc' into 'master'
Adding include in and exclude from doctests



Signed-off-by: Jason Myers <jason@jasonamyers.com>

See merge request !50
2015-12-30 19:55:08 +00:00
Jason Myers
c9309cb87c Adding include in and exclude from doctests
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2015-12-30 13:14:08 -06:00
Ian Cordasco
bfe978992a Merge branch 'docs_off_by_default' into 'master'
Adding docs for off by default

This adds documentation for the off_by_default option for extensions,
which was added in MR !14. Fixes #24.

Signed-off-by: Jason Myers <jason@jasonamyers.com>

See merge request !48
2015-12-20 17:54:22 +00:00
Jason Myers
b0a6bada5c Switching to --enable-extensions instead of --select
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2015-12-20 11:23:41 -06:00
Jason Myers
a08a65b982 Adding docs for off by default
This adds documentation for the off_by_default option for extensions,
which was added in MR !14.

Signed-off-by: Jason Myers <jason@jasonamyers.com>
2015-12-19 15:48:32 -06:00
Ian Cordasco
b50c510970 Merge branch 'pr/47' 2015-12-17 08:38:05 -06:00
Ian Cordasco
fa1105aaac Isolate the commands that raise OSError
Right now, running the git and hg commands could easily raise an
OSError. Let's only catch it in those cases and then use else to
install hooks when those are successful. Otherwise, pass on to the next
supported VCS
2015-12-17 08:35:50 -06:00
adammhaile
4da31aa521 Fix checking for repo dir without git/hg 2015-12-16 22:40:57 -05:00
Ian Cordasco
8b27711400 Correct release date for 2.5.1
Closes #108
2015-12-14 13:13:38 -06:00
Ian Cordasco
2ed54042cf Merge branch 'master' into 'master'
Add a FAQ section to the readme

It seems like these two questions happen a lot, and are a source of strife.  I know that many people won't read an FAQ, but at the very least, it will be a place to point people instead of, "Google for information."

See merge request !46
2015-12-11 14:17:53 +00:00
Ned Batchelder
17e397fb2c Add a FAQ section to the readme 2015-12-11 08:14:21 -05:00
Ian Cordasco
acea4affaa Merge branch 'docs/per_project_config_list' into 'master'
Fix per-project configuration file list



See merge request !45
2015-12-09 14:09:01 +00:00
Andrew Widdersheim
828c69ea27 Fix per-project configuration file list 2015-12-09 08:54:51 -05:00
Ian Cordasco
4fb7d6a9a7 Bump version for v2.5.1 2015-12-07 22:56:23 -06:00
Ian Cordasco
d288843fb7 Merge branch 'bug/107' 2015-12-07 22:55:08 -06:00
Ian Cordasco
5021da880c Update stdin_get_value monkey-patching
Let's use an enclosed function to replace the stdin_get_value function
on pep8.

Closes #107
2015-12-07 22:50:39 -06:00
Ian Cordasco
d5e3987a9c Merge branch 'pep8-stdin-fix' into 'master'
Cache stdin for Flake8 plugins

Currently plugins (e.g., flake8-docstrings) are struggling to support
users passing data in on stdin (e.g., cat file.py | flake8 -). Until
pep8 fixes this itself, we can monkey-patch its `stdin_get_value`
function to handle the caching for us.

Closes #105

See merge request !44
2015-12-04 23:54:29 +00:00
Ian Cordasco
41393c9b6d Cache stdin for Flake8 plugins
Currently plugins (e.g., flake8-docstrings) are struggling to support
users passing data in on stdin (e.g., cat file.py | flake8 -). Until
pep8 fixes this itself, we can monkey-patch its `stdin_get_value`
function to handle the caching for us.

Closes #105
2015-12-04 00:13:28 -06:00
Ian Cordasco
54a81c0595 Merge branch 'bug/103' into 'master'
Add .flake8 to PROJECT_CONFIG for local config files

Closes #103 

See merge request !43
2015-11-25 02:57:45 +00:00
Ian Cordasco
17553e6192 Add .flake8 to PROJECT_CONFIG for local config files 2015-11-23 10:20:42 -06:00
Ian Cordasco
75ad81eb13 Update twine dependency and usage 2015-10-27 11:29:52 -05:00
Ian Cordasco
3e7d5b952d Merge branch 'release/2.5.0' into 'master'
Release 2.5.0



See merge request !42
2015-10-26 01:20:16 +00:00
Ian Cordasco
99bc94edaa Release notes and version bump for v2.5.0 2015-10-24 20:11:15 -05:00
Ian Cordasco
63b9a84367 Add a few more items to our gitignore 2015-10-24 18:39:53 -05:00
Ian Cordasco
7c08ee8c92 Bump pyflakes cap to 1.1.0 2015-10-24 18:39:24 -05:00
Ian Cordasco
ac87e2d71e Merge branch 'GeonU/flake8-bug-setuptools-options' 2015-10-07 22:09:20 -05:00
Ian Cordasco
d422325548 Rewrite some tests from !41 2015-10-07 22:09:04 -05:00
geonu
0cc12e22ae Add option_normalizer test code 2015-10-03 20:46:11 +09:00
geonu
186f41edcb Delete unnecessary function 2015-10-03 20:46:10 +09:00
geonu
0d006a3521 Delete unused import 2015-10-03 20:46:10 +09:00
geonu
28138a2135 Use option_normalizer 2015-10-03 20:46:10 +09:00
geonu
f67552d09a Add option_normalizer for setuptools 2015-10-03 20:46:10 +09:00
Ian Cordasco
bf19122741 Merge branch 'bug/67' into 'master'
Remove enabled extensions from `options.select`

When taking advantage of the --select flag for off-by-default
extensions, we neglected to take into account the fact that leaving the
extension names in the select list would cause different behaviour in
pep8. This should remedy this.

Related to GitLab bug #67

----

cc @joe-gordon0

See merge request !37
2015-09-28 01:32:11 +00:00
Ian Cordasco
bf5baf1e0c Merge branch 'python-3.5' into 'master'
Update .travis.yml for Python 3.5



See merge request !40
2015-09-27 20:05:17 +00:00
Ian Cordasco
064661041d Update .travis.yml for Python 3.5 2015-09-27 15:04:49 -05:00
Ian Cordasco
7fb3dd6a74 Merge branch 'bug/90' into 'master'
Add better logic for loading entry points

As noted in the code, setuptools 11.3 deprecated EntryPoint.load and
its require parameter. Starting with 11.3 the preferred way is use
EntryPoint.require and EntryPoint.resolve as necessary. Unfortunately,
those methods do not exist in all versions of setuptools. So we have
to check for them and use them when they're available. Otherwise, we
fallback to using EntryPoint.load with the require parameter.

Closes #59
Closes #90

See merge request !39
2015-09-27 20:03:12 +00:00
Ian Cordasco
0c0eadc0a0 Add better logic for loading entry points
As noted in the code, setuptools 11.3 deprecated EntryPoint.load and
its require parameter. Starting with 11.3 the preferred way is use
EntryPoint.require and EntryPoint.resolve as necessary. Unfortunately,
those methods do not exist in all versions of setuptools. So we have
to check for them and use them when they're available. Otherwise, we
fallback to using EntryPoint.load with the require parameter.

Closes #59
Closes #90
2015-09-27 14:11:17 -05:00
Ian Cordasco
96cb23e2e7 Add --enable-extensions flag to Flake8
This new flag is added so that off-by-default extensions can be enabled
without using --select which (currently) causes several problems with
pep8's rule engine. This also adds support to the --enable-extensions
flag to be specified as a multi-line config option in an appropriate
config file.

Closes GitLab #67
2015-09-27 10:08:23 -05:00
Ian Cordasco
5b7dc3927a Remove enabled extensions from options.select
When taking advantage of the --select flag for off-by-default
extensions, we neglected to take into account the fact that leaving the
extension names in the select list would cause different behaviour in
pep8. This should remedy this.

Related to GitLab bug #67
2015-09-27 10:08:23 -05:00
Luke Plant
b8457ebb24 Added link to flake8-respect-noqa extension. 2015-09-07 15:13:30 +00:00
Ian Cordasco
a1154e41df Merge branch 'bug/74' into 'master'
Refactor how we use StyleGuides for better error recovery

In bug 74 we discovered that there are some less than ideal problems
around our use of multiprocessing. This is a first attempt at fixing
74 by using a fake StyleGuide object which proxies to the real one,
and will catch and handle exceptions and then posibly retry the
operation we were trying to perform in the first place.

Currently we're only implementing that logic for StyleGuide.check_files
but we should be careful to implement this in other functions used in
hooks and elsewhere.

Note: there may be a simpler way to fix this with a context manager
that will do the right thing. That may also prove simpler to implement
but that will have a much larger impact on the code-base than this.

Related to bug #74

See merge request !36
2015-08-23 00:59:33 +00:00
Ian Cordasco
9d734158ca Add tests around the OSError retry logic
This updates our retry logic to be more specific in catching OSErrors
and it adds specific tests to show that it works and properly
re-initializes the StyleGuide with the pep8.StandardReport class so we
can fall back on serial behaviour gracefully.

Closes #74
2015-08-22 19:47:42 -05:00
Ian Cordasco
f1aa58889d Add a helper method for retrying checks in serial
This allows us to reuse the same code simply for check_files and
input_file. This should cover all uses of the StyleGuide methods.

Related to bug #74
2015-08-20 21:13:19 -05:00