Commit graph

1025 commits

Author SHA1 Message Date
Ian Cordasco
469da96001
Add new Flake8 classifier to Trove list 2016-07-09 16:16:07 -05:00
Ian Cordasco
2e5100d44c Merge branch 'bug/163' into 'master'
Update setuptools integration for setup.cfg

*Description of changes*

Allow setuptools to parse config options from setup.cfg and pass them along via the attributes on our Flake8 command.

*Related to:*  #163

See merge request !67
2016-07-09 21:10:44 +00:00
Ian Cordasco
f93a3f3c7b Merge branch 'get-option' into 'master'
Use option name provided by the parser

Use the `Option` object returned to get the actual name.

*Related to:* #158

See merge request !68
2016-07-09 20:09:23 +00:00
Fabian Neundorf
fabb13c5d1 Use option name provided by the parser
When calling `add_option` it returns an `Option` object which can return the
primary name of the option via `get_opt_name`. This should be used primarily
in the cross compatible implementation so that the order of parameters does
not matter.
2016-07-09 21:27:19 +02:00
Ian Cordasco
ae794fb46a
Update setuptools integration for setup.cfg
When flake8's config is in setup.cfg, setuptools attempts to set those
options on the command instance. If they don't exist, it fails early
complaining that a specific option does not exist.

This adds this back and does it better than the Flake8 2.x version.

Closes #163
2016-07-09 07:02:27 -05:00
Ian Cordasco
45a57df542 Merge branch 'backwards-compat-api' into 'master'
Backwards Compatibility API

*Description of changes*

Add `flake8.api.legacy` to replace `flake8.engine`'s public API.

*Related to:*  N/A

See merge request !66
2016-07-08 16:08:27 +00:00
Ian Cordasco
1372d0dd1c
Handle kwargs passed to get_style_guide 2016-07-07 17:39:02 -05:00
Ian Cordasco
a4ce229fb6
Fill in most of the legacy API
This does not handle setting custom options via the parameters to
get_style_guide.
2016-07-07 13:29:53 -05:00
Ian Cordasco
41cd67f747
Simplify our test environments 2016-06-30 20:09:46 -05:00
Ian Cordasco
cde783d135
Clean up setup.py a bit 2016-06-30 16:03:02 -05:00
Ian Cordasco
4a05d02ca6
Fix up MANIFEST.in 2016-06-30 15:34:29 -05:00
Ian Cordasco
6a2ad045fa
Add the skeleton for the LegacyStyleGuide 2016-06-30 08:27:32 -05:00
Ian Cordasco
f963641e93
Update defaults
McCabe reports C90* not C* and Flake8 2 used to exclude .eggs and *.egg
2016-06-30 06:54:10 -05:00
Ian Cordasco
6208a4969b
Add README to linters
Add basepythons to dogfood and readme
2016-06-29 19:17:20 -05:00
Ian Cordasco
8f5348136f
Remove exc_info for logging.exception
It's redundant and the docs say explicitly that it's ignored.
2016-06-29 15:22:22 -05:00
Ian Cordasco
5b8a875965
Add 3.0.0b2 release notes 2016-06-28 20:47:44 -05:00
Ian Cordasco
75e1c1efbf
Revert "Prefer .flake8 if present for options."
The intended behaviour already existed.

This reverts commit db9d4ad8b4.
2016-06-28 20:47:16 -05:00
Ian Cordasco
15745558c1
Iterate over the checkers fewer times 2016-06-28 20:27:29 -05:00
Ian Cordasco
d8665435a5
Bump version for next beta release 2016-06-28 20:26:50 -05:00
Ian Cordasco
497f52e4b1
Add a dogfood testenv 2016-06-28 13:21:58 -05:00
Ian Cordasco
84af24f240
Fix some logging and logging levels 2016-06-28 13:21:22 -05:00
Ian Cordasco
c9fb680dff
Add python and platform details to --version
On Flake8 2.x we added the information about the implementation,
version, and operating system to the --version output to make helping
users easier. In short they can pretty simply just give us the output
from

    flake8 --version

And we can get a lot of the information that we need.
2016-06-28 13:02:50 -05:00
Ian Cordasco
2d3e277b1e
Handle optional parameters that were never supported
Previously, pycodestyle never introspected the argument names for
classes except to require that ``tree`` be an argument it could pass.
For Flake8 3.0, we lifted that restriction, but old plugins seem to
have cargo-culted their __init__ signature to be

    def __init__(self, tree, builtins=None):

For some yet unknown reason. This was causing an AttributeError. By
updating flake8.utils.parameters_for to return a dictionary that
indicates whether the parameter is required or not, we can side-step
this by simply ignoring the parameter if it has a default value and
we cannot provide it.

Closes #151
2016-06-28 09:36:24 -05:00
Ian Cordasco
ec2e601cbf
Enable plugins automatically during registration
Previously the --select was only ever populated to E,F,W,C and so
plugins would not be reported when not off-by-default. This adds a
tiny shim so that we enable plugins that are not off-by-default and
:x
:x
2016-06-28 07:42:51 -05:00
Ian Cordasco
31c32e3327
Parse hyphenated config names also
Previously Flake8 parsed both

    max-line-length = 110

And

    max_line_length = 110

From the config file without issue. When we updated our logic, I forgot
to test for that and we lost that behaviour temporarily.

Closes #152
2016-06-28 05:47:14 -05:00
Ian Cordasco
95c373cf11
Handle EarlyQuits and KeyboardInterrupts 2016-06-26 20:29:13 -05:00
Ian Cordasco
7fe5b359f7
Add high-level overview of how things fit together
There are now a lot of moving parts in Flake8. It can't help to give new
developers a high-level overview of how they all fit together to make
Flake8. =)
2016-06-26 20:28:24 -05:00
Ian Cordasco
b194717d1a
Search current directory if no paths are specified
This fixes a regression in behaviour from 2.x to 3.

Closes #150
2016-06-26 15:08:58 -05:00
Ian Cordasco
790549fd25
Open our README appropriately
Systems without a LOCALE present will not be able to read our file
appropriately on Python 3. This was causing our Python 3 CI jobs on
GitLab to fail.
2016-06-26 07:13:16 -05:00
Ian Cordasco
b82e0d5176
Add forgotten release note 2016-06-26 06:44:05 -05:00
Ian Cordasco
5a9b7c27ab
Update compatibility docs 2016-06-26 06:41:47 -05:00
Ian Cordasco
6b7855e102
Update the README 2016-06-25 20:09:56 -05:00
Ian Cordasco
2c4eb1377b Merge branch 'add-gitlab-ci' into 'master'
Enable GitLab CI

*Description of changes*

Add a `.gitlab-ci.yml` so we can have multiple services (including Jenkins, once I fix it).

*Related to:*  None

See merge request !65
2016-06-25 21:11:10 +00:00
Ian Cordasco
6bca1c30cc
Fix linters to use src/flake8 2016-06-25 16:07:28 -05:00
Ian Cordasco
951bbe337f
Add python*-dev packages 2016-06-25 16:00:45 -05:00
Ian Cordasco
7f3783d109 Merge branch 'prefer-.flake8' into 'master'
Prefer `.flake8` if present for options.

This is a reprise of !63 for 3.0.

See merge request !64
2016-06-25 20:29:15 +00:00
Ian Cordasco
b5d13260eb
Enable GitLab CI 2016-06-25 15:28:31 -05:00
Tom Prince
db9d4ad8b4 Prefer .flake8 if present for options.
If somebody explicitly has a `.flake8` file, presumably they intend to
put flake8 configuration in it, so prefer it to the generic `setup.cfg`
and `tox.ini` from pycodestyle.
2016-06-25 14:22:21 -06:00
Ian Cordasco
00575214db
Add missing release notes 2016-06-25 12:29:58 -05:00
Ian Cordasco
04413f8338
Add the long description back to setup.py 2016-06-25 12:27:14 -05:00
Ian Cordasco
cee691059f
Merge branch 'origin/proposed/3.0' into master 2016-06-25 12:01:02 -05:00
Ian Cordasco
6eb2e3a701
Add more release notes for 3.0.0b1 2016-06-25 11:55:52 -05:00
Ian Cordasco
7340b3e057
Add release note for 2.6.1 2016-06-25 11:40:41 -05:00
Ian Cordasco
9308910893
Bump version for 2.6.1 2016-06-25 11:37:24 -05:00
Ian Cordasco
fe8c59c113 Merge branch 'prefer-.flake8' into 'master'
Prefer `.flake8` if present for options.

If somebody explicitly has a `.flake8` file, presumably they intend to put flake8 configuration in it, so prefer it to the generic `setup.cfg` and `tox.ini` from pycodestyle.


See merge request !63
2016-06-25 16:32:26 +00:00
Ian Cordasco
5d1150cc27
Update the packaging so wheels work 2016-06-25 11:20:28 -05:00
Ian Cordasco
1ec83033e9
Update the copyright in the LICENSE 2016-06-25 10:49:32 -05:00
Ian Cordasco
7b31ecf7d5
Update the MANIFEST.in for sdists
Let's include our documentation, tests, and src code appropriately
2016-06-25 10:48:52 -05:00
Ian Cordasco
1a2c68f5da
Move flake8 into src
This is an emerging best practice and there is little reason to not
follow it
2016-06-25 10:12:13 -05:00
Ian Cordasco
5c8d767626
Rename dev subdirectory to plugin-development
This should make the contents clearer
2016-06-25 09:51:15 -05:00