Commit graph

566 commits

Author SHA1 Message Date
Ian Cordasco
20ed95f70e Add Corey to the CONTRIBUTORS file 2015-04-30 16:20:02 -05:00
Tyrel Souza
daf043b7ae Fix parsing ignore
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)
2015-04-30 16:18:31 -05:00
Ian Cordasco
36b8e725fa Merge branch 'windows_docs_fix' into 'master'
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
2015-04-30 20:36:18 +00:00
Tyrel Souza
181cffda7f Add a note about Windows .flake8 config location 2015-04-30 16:23:18 -04:00
Ian Cordasco
9e95a7315e Merge branch 'master' into 'master'
Utilize generator expression instead of list comprehension

See merge request !28
2015-04-19 01:22:24 +00:00
Corey Farwell
5ba109ba93 Utilize generator expression instead of list comprehension 2015-04-18 01:22:37 -04:00
Ian Cordasco
159c4930e1 Merge branch 'bug/52' into 'master'
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
2015-04-06 15:45:16 +00:00
Ian Cordasco
12fab2f8ad 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
2015-04-05 23:01:44 -05:00
Ian Cordasco
ea628fa9d1 Merge branch 'fix_jobs_test_underscore' into 'master'
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
2015-03-17 03:50:31 +00:00
Christian Long
ef3a47a155 Move test back where it was 2015-03-16 19:27:39 -05:00
Christian Long
63d8af6af5 Document the other things I tried 2015-03-16 19:12:46 -05:00
Christian Long
7663dbd485 Run some tests separately 2015-03-16 18:21:57 -05:00
Christian Long
59d632e0bf Rename file 2015-03-16 18:21:56 -05:00
Ian Cordasco
e8460dfe51 Merge branch 'fix_hook_test' into 'master'
Fix hook test

Fix the git hook test on Windows.

Closes #43

See merge request !24
2015-03-12 03:01:38 +00:00
Christian Long
5dffadd67b Shorten variable name. Add comments 2015-03-11 21:20:28 -05:00
Christian Long
02308dab2a Fix hook test on Windows
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.
2015-03-11 19:50:31 -05:00
Ian Cordasco
c51702e9f0 Add notes for merge request 23 2015-03-10 22:03:55 -05:00
Ian Cordasco
de281ff1f0 Merge branch 'master' into 'master'
Fix issue #39

Only raise SystemExit if there is an error.

See merge request !23
2015-03-11 03:00:42 +00:00
Michael McNeil Forbes
dca5551156 Removed some unused testing code. 2015-03-09 11:27:15 -07:00
Michael McNeil Forbes
1fd8b66174 Fix issue #39. 2015-03-08 21:14:50 -07:00
Michael McNeil Forbes
da2b0b8a43 Added test demonstrating issue #39 2015-03-08 21:13:01 -07:00
Ian Cordasco
ea456614b5 Update version and release notes for 2.4.0 2015-03-07 20:42:08 -06:00
Ian Cordasco
6536f2285d Merge branch 'tox_remove_py25' into 'master'
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
2015-03-08 02:24:17 +00:00
Ian Cordasco
a66815ffa6 Merge branch 'christianmlong/issue/8' 2015-03-07 20:22:11 -06:00
Ian Cordasco
a6fc242c5e Slightly simplify our conditionals
Test warnings by default
2015-03-07 20:21:58 -06:00
Ian Cordasco
0e2b873c38 Add compatibility layer for Python 2.6
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.
2015-03-06 23:43:36 -06:00
Ian Cordasco
7ab30a747f Merge branch 'local/pr/2'
Conflicts:
	flake8/hooks.py
2015-03-06 23:26:44 -06:00
Ian Cordasco
c084211e9e Merge remote-tracking branch 'origin/gh/2' 2015-03-06 23:04:49 -06:00
Ian Cordasco
84c8dd5e8d Simplify @mpenkov's fix for exclude in git hooks
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.
2015-03-06 23:01:30 -06:00
Ian Cordasco
500a64f040 Add notes for updates to git hook 2015-03-06 20:55:25 -06:00
Ian Cordasco
54946334db WIP 2015-03-06 19:47:55 -06:00
Christian Long
59ae3dfec7 Add --verbose flag, and tests for it.
The new warnings associated with the --jobs argument should only appear when
the --verbose flag is passed.
2015-03-06 15:34:02 -06:00
Christian Long
c3f5d144bc Add warnings when --jobs is invalid
Some platforms and options are not compatible with the --jobs option. For
example, it is not valid on Windows. Nor is it compatible with the --diff
option. This adds warnings when the --jobs option is supplied but is not
allowed.
2015-03-06 14:45:33 -06:00
Marc Abramowitz
8ef2462e6e tox.ini: Remove py25
because tox doesn't support it yet.

    ERROR:   py25: UnsupportedInterpreter: python2.5 is not supported anymore, sorry
2015-03-05 09:15:50 -08:00
Christian Long
a9f375aa93 Fix tests on Windows
The tests were failing on Windows. On Windows, the jobs argument never gets
converted to an int (engine.get_style_guide line 133) This resulted in
AssertionError '2' != 2. So, do the int conversion in the test. Also, on
Winddows, the call count is always 0, no matter the jobs argument.
2015-02-23 16:52:11 -06:00
Ian Cordasco
bc18d8e2d1 Use the default ReadTheDocs theme 2015-02-22 22:37:13 -06:00
Ian Cordasco
ba344c8ded Refactor some bits of flake8.hooks 2015-02-22 22:29:13 -06:00
Ian Cordasco
eae9a6a3db Merge branch 'use_git_config_in_hook' into 'master'
Use git config in hook

Get parameter's value using `git config` before trying `os.environ`.

See merge request !20
2015-02-23 03:58:52 +00:00
Ian Cordasco
7c132d1c33 Update release notes, dependencies, and version
Closes #32
2015-02-22 12:13:30 -06:00
Ian Cordasco
96817b40b2 Merge branch 'issue/31' into 'master'
Add FileQReport to replace pep8's FileReport when using multiprocessing

See merge request !21
2015-02-22 18:05:41 +00:00
Ian Cordasco
d6a5df1e58 Truly mimic pep8's -q functionality
When the user only passes -q once, print the filenames. If they pass -qq then
don't print anything.

Closes #31
2015-02-22 11:40:57 -06:00
Oleg Broytman
836d66a11f Document configuration file settings 2015-02-16 07:32:17 +03:00
Oleg Broytman
d03b526913 Use git config before os.environ
Get parameter's value using git config before trying os.environ.
2015-02-16 07:32:17 +03:00
Oleg Broytman
4d9a88298b Minor refactoring 2015-02-16 06:09:43 +03:00
Michael Penkov
de9fd7d6a2 Adding unit tests for fix in 218949a 2015-02-07 16:33:35 +09:00
Ian Cordasco
2f577791db Bump version to 2.3.0 and update changelog 2015-01-04 14:49:07 -06:00
Ian Cordasco
b4f9f8e8ae Add release to tox.ini 2015-01-04 14:31:19 -06:00
Ian Cordasco
6b27451e57 Merge branch 'feature/output-file' into 'master'
Add --output-file option

Addresses #15

This is, however, unfortunately affected by #17. That will need to be fixed before this can be merged.

See merge request !15
2014-12-27 15:33:31 +00:00
Ian Cordasco
8adb88cf11 Add --output-file option
Closes #15
2014-12-27 09:07:10 -06:00
Ian Cordasco
c761d22876 Merge branch 'feature/register-optional-checks' into 'master'
Allow for optional checks

See merge request !14
2014-12-27 15:05:11 +00:00