Commit graph

1285 commits

Author SHA1 Message Date
Ian Cordasco
218a0b6980
Release v3.3.0
Closes #300
2017-02-06 13:46:51 -06:00
Ian Cordasco
d4d487ea97
Update and finalize v3.3.0 release notes 2017-02-06 13:46:04 -06:00
Ian Cordasco
1a6f8f4169 Merge branch 'allow_newer_pycodestyle' into 'master'
Allow newer pycodestyle

See merge request !175
2017-02-03 13:01:05 +00:00
Anthony Sottile
8ff30e2676 Allow newer pycodestyle 2017-02-02 12:22:22 -08:00
Ian Cordasco
1a6b02cb96 Merge branch 'bug/303' into 'master'
Do not run git-hook checks when there are no files

Closes #303

See merge request !174
2017-01-27 22:11:10 +00:00
Ian Cordasco
49fcbf468d
Do not run git-hook checks when there are no files
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
2017-01-27 15:57:23 -06:00
Ian Cordasco
77d887f400 Merge branch 'bug/279' into 'master'
Avoid calling rstrip on None

Closes #279

See merge request !173
2017-01-27 21:29:36 +00:00
Ian Cordasco
7ca05a9ca1
Avoid calling rstrip on None
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
2017-01-27 15:22:49 -06:00
Ian Cordasco
9145674cf2 Merge branch 'dev-status' into 'master'
Add "Development Status" classifier to setup.py

See merge request !172
2017-01-27 11:42:39 +00:00
Jon Dufresne
7824162ee6 Add "Development Status" classifier to setup.py 2017-01-26 18:08:43 -08:00
Ian Cordasco
263f664a73 Merge branch 'bug/300' into 'master'
Update dependencies for Python 3.6

See merge request !171
2017-01-23 12:49:45 +00:00
Ian Cordasco
499bc72c35
Update dependencies for Python 3.6 2017-01-23 06:44:20 -06:00
Ian Cordasco
f7c01db9ba Merge branch 'bug/295' into 'master'
Return similarly named, non-submodule modules

Closes #295

See merge request !170
2017-01-22 21:08:33 +00:00
Ian Cordasco
9f8dfd924a
Return similarly named, non-submodule modules
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
2017-01-22 15:00:48 -06:00
Ian Cordasco
c1f9dc7241 Merge branch 'mr/164' into 'master'
Make `flake8 --version` reproducible between invocations

Closes #297

See merge request !169
2017-01-21 20:19:55 +00:00
Ian Cordasco
c9ea51aa45
Add test for reproducible --version strings
And add a release note to document the change.
2017-01-21 14:14:59 -06:00
Raphael Das Gupta
f0f2ea7f4e
Force --version to be reproducible
By ordering the plugins, --version becomes reproducible so that it
continuously prints the same output (provided the plugins have not
changed).

Closes #297
2017-01-21 13:59:49 -06:00
Ian Cordasco
29d9090954
Change dogfood environment to use Python 2.7
This eliminates any ambiguity with respect to which version of Python is
necessary for the dogfood environment and should fix up the AppVeyor
tests
2017-01-21 13:51:01 -06:00
Ian Cordasco
944838d0ec Merge branch 'py36' into 'master'
Add py36 to tox, correct a tiny typo

See merge request !168
2017-01-21 13:29:34 +00:00
Anthony Sottile
3afd74edf8 Add py36 to tox, correct a tiny typo 2017-01-20 12:18:29 -08:00
Ian Cordasco
e0fa9077ca Merge branch 'fix-systema-typo' into 'master'
Correct "systema" typo in usage documentation.

See merge request !166
2017-01-18 11:46:54 +00:00
Andrew Drake
b806d122d3 Correct "systema" typo in usage documentation. 2017-01-17 14:58:50 -08:00
Ian Cordasco
e3674c40bc Merge branch 'bug/290' into 'master'
Add AST support for Python 3.6

Closes #290

See merge request !165
2017-01-15 20:51:21 +00:00
Ian Cordasco
88cbf83d29
Add Python 3.6 to CI services 2017-01-15 11:26:12 -06:00
Ian Cordasco
bc840e2403
Add AST support for Python 3.6
Upgrade version constraints on PyFlakes to only the versions that handle
Python 3.6

Closes #290
2017-01-15 11:26:07 -06:00
Ian Cordasco
f32e151b47
Fix up GitLab CI runners
PyLint does not yet support 3.6 [1] and the dogfood environment really
shouldn't be pinning to a specific version of Python 3.

[1]: https://github.com/PyCQA/pylint/issues/1241
2017-01-15 09:33:50 -06:00
Ian Cordasco
a0280240fc
Merge branch 'setuptools-exit' of scop/flake8 2017-01-14 10:33:32 -06:00
Ian Cordasco
a761ba2901 Merge branch 'bug/276' into 'master'
Add documentation and reasoning for code style

Closes #276

See merge request !163
2016-12-24 00:28:05 +00:00
Ian Cordasco
4629c75a67
Blacklist pytest 3.0.5
See also https://github.com/pytest-dev/pytest/issues/2118
2016-12-23 09:34:54 -06:00
Ian Cordasco
57d8bca4af
Add documentation for our code style 2016-12-23 09:34:19 -06:00
Ian Cordasco
4bd7998162 Merge branch 'bug/244' into 'master'
Display the local paths from the git hook

Instead of displaying the path to the temporary directory, as we always
have, it's been requested that we instead display the path to the file
that was copied to the temporary directory.

Closes #244

See merge request !154
2016-12-21 01:25:06 +00:00
Ian Cordasco
d6b1baf8af
Display the local paths from the git hook
Instead of displaying the path to the temporary directory, as we always
have, it's been requested that we instead display the path to the file
that was copied to the temporary directory.

Closes #244
2016-12-20 19:15:18 -06:00
Ian Cordasco
85c495b012 Merge branch 'feature/251' into 'master'
Enable users who want to track all files processed

This adds two new methods to the BaseFormatter class:

- beginning
- finished

These will indicate when Flake8 begins and finishes processing a file.

Closes #251

See merge request !152
2016-12-21 01:12:31 +00:00
Ian Cordasco
5248cf3c2d
Enable users who want to track all files processed
This adds two new methods to the BaseFormatter class:

- beginning
- finished

These will indicate when Flake8 begins and finishes processing a file.

Closes #251
2016-12-20 19:08:11 -06:00
Ian Cordasco
cf0115e105
Merge branch 'perf-improvements' 2016-12-20 18:31:28 -06:00
Ian Cordasco
9b8f038a97
Tidy up last few bits for performance improvement 2016-12-20 18:29:10 -06:00
Ville Skyttä
2bc78e62bc Cause system exit only for non-zero exit statuses in setuptools command
See https://github.com/pypa/setuptools/issues/850#issuecomment-265445007
2016-12-08 18:13:03 +02:00
Anthony Sottile
109f5f8888 Simplify and speed up multiprocessing 2016-11-29 09:00:33 -08:00
Ian Cordasco
348722d77b Merge branch 'pyflakes_missing_codes' into 'master'
Assign missing codes to PyFlakes messages

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.

See merge request !159
2016-11-29 13:02:15 +00:00
Lukasz Langa
2f1338c342 Assign missing codes to PyFlakes messages
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.
2016-11-28 10:34:38 -08:00
Ian Cordasco
b8ce1334d0 Merge branch 'bug/268' into 'master'
Only force files to be included when run from CLI

Previously we added support so users can do:

    $ flake8 bin/executable

But this broke the fact that git hooks shouldn't check things like
reStructuredText doc files. This commit restores that functionality but
will cause bin/executable to be ignored in the git hook. This seems fair
since folks can amend their filename patterns to include it explicitly.

Closes #268

See merge request !157
2016-11-23 22:50:13 +00:00
Ian Cordasco
e4582ef4e7
Only force files to be included when run from CLI
Previously we added support so users can do:

    $ flake8 bin/executable

But this broke the fact that git hooks shouldn't check things like
reStructuredText doc files. This commit restores that functionality but
will cause bin/executable to be ignored in the git hook. This seems fair
since folks can amend their filename patterns to include it explicitly.

Closes #268
2016-11-23 16:36:26 -06:00
Ian Cordasco
f8fbc11fad
Merge branch 'master' of github.com/onovy/flake8 2016-11-22 16:26:12 -06:00
Ondřej Nový
8a3869e965 Require mock 2.0.0, because unit tests are failing on older one 2016-11-22 22:43:54 +01:00
Ian Cordasco
a52aedc0a0
Prepare for 3.3.0 development 2016-11-21 17:46:09 -06:00
Ian Cordasco
a981fe34ed
Update release notes and version string for 3.2.1 2016-11-19 19:34:33 -06:00
Ian Cordasco
ae9e832cc1 Merge branch 'bug/259' into 'master'
Handle SyntaxErrors in a slightly smarter way

SyntaxErrors are strange and mystical beasts. On top of the problems we
encountered previously in GitLab#237, it's now apparent that
SyntaxErrors can also occur across multiple lines (in fact, across the
rest of a file). In the event of a "multi-line" SyntaxError, we need to
determine what row to report and what the column number is.

For now, we're going to use the row number of the first line and limit
the column number to be less than the end of the line. It may not be
perfect, but it is slightly better.

Related-to #237  
Closes #259 

cc @arcanemagus

See merge request !151
2016-11-20 01:29:46 +00:00
Ian Cordasco
a7fb806175 Merge branch 'bug/266' into 'master'
Skip filename pattern check for provided files

By default, when discovering files for users, we use the filename
patterns to determine whether or not we should check that file. However,
when a user provides the path to a file, we should instead skip checking
the name against the filename patterns provided.

For example, in Flake8 2.6 this worked:

    $ flake8 bin/script.py
    $ flake8 bin/script

But prior to this commit only

    $ flake8 bin/script.py

works. This commit will skip the filename pattern check if the user
provides the path explicitly which allows

    $ flake8 bin/script

to work again as expected.

Closes #266

See merge request !153
2016-11-19 16:25:32 +00:00
Ian Cordasco
78e8165b06
Skip filename pattern check for provided files
By default, when discovering files for users, we use the filename
patterns to determine whether or not we should check that file. However,
when a user provides the path to a file, we should instead skip checking
the name against the filename patterns provided.

For example, in Flake8 2.6 this worked:

    $ flake8 bin/script.py
    $ flake8 bin/script

But prior to this commit only

    $ flake8 bin/script.py

works. This commit will skip the filename pattern check if the user
provides the path explicitly which allows

    $ flake8 bin/script

to work again as expected.

Closes #266
2016-11-19 08:21:36 -06:00
Ian Cordasco
07c187b8d3
Handle SyntaxErrors in a slightly smarter way
SyntaxErrors are strange and mystical beasts. On top of the problems we
encountered previously in GitLab#237, it's now apparent that
SyntaxErrors can also occur across multiple lines (in fact, across the
rest of a file). In the event of a "multi-line" SyntaxError, we need to
determine what row to report and what the column number is.

For now, we're going to use the row number of the first line and limit
the column number to be less than the end of the line. It may not be
perfect, but it is slightly better.

Related-to #237
Closes #259
2016-11-17 17:17:48 -06:00