Commit graph

40 commits

Author SHA1 Message Date
Andrew Rogl
277f4e72d1 Remove unrequired flake8 checks 2021-08-27 08:26:07 +10:00
Andrew Rogl
e262766580 pyupgrade root 2021-08-25 15:27:16 +10:00
Adrian Sampson
8d3cfe46ed
Ignore a new pep8-naming error
The new error <https://github.com/PyCQA/pep8-naming/pull/157> strikes me
as a little overzealous: while most exceptions are errors, there are
some Exception subclasses that are *not* properly considered errors
(e.g., when they're only a base class for other error classes).
2021-07-15 09:52:43 -04:00
Jacob Pavlock
4e93469421 fix missing docstring-convention declaration 2020-07-29 20:32:53 -07:00
Jacob Pavlock
019055c156 add docstring checks to flake8
currently ignore all errors on a per-file basis
2020-07-29 17:21:15 -07:00
Jacob Pavlock
52afd717aa remove docstring-convention and update comment 2020-07-11 19:10:04 -07:00
Jacob Pavlock
124c882b4d un-ignore E221 2020-07-11 18:33:08 -07:00
Jacob Pavlock
abad0f9c08 un-ignore flake8 E226, E242, E704
none of these required any code changes
2020-07-11 18:22:43 -07:00
Jacob Pavlock
1db46dfeb6 reformat flake8 errors 2020-07-11 18:15:41 -07:00
Jacob Pavlock
dabde74683 nose -> pytest and clean-up tox 2020-07-06 17:03:11 -07:00
Adrian Sampson
966108b72c Enable flake8 E226
This is the rule that prohibits `1+2` in favor of `1 + 2`. I didn't
realize it was disabled by default!
2018-08-13 10:37:45 -04:00
Adrian Sampson
7c9ce0da7a Ignore yet another new flake8 error
As described in PyCQA/pycodestyle#598, pycodestyle has exposed a new
error for "ambiguous variable names." I really wish this project were
less eager to add new warnings of questionable value that are enabled by
default...
2017-10-29 16:29:06 -04:00
zigarrre
e30513db9b Added the default ignore list of flake8
This fixes the W503 warnings and possibly other, unwanted errors and
warnings in the future.
2017-09-12 18:19:18 +02:00
Adrian Sampson
4c6bf782a2 Ignore a new flake8 style warning
It's always fun when the style checker suddenly decides something new is bad
style. :/
2016-11-16 12:01:37 -05:00
Johnny Robeson
08cd22834b add flake8-coding to our tox config
Now we can enforce that all py files have the coding magic comment with
utf-8.
2016-08-07 04:09:58 -04:00
Johnny Robeson
e1d1d7b026 remove eval-attr for slow tests in setup.cfg
The code that relied on this in the tests was removed in 84c82cc44b

I don't think this was a good global option anyways, so I don't see us
returning to it.

This was discovered by @JesseWeinstein
2016-07-21 01:58:08 -04:00
Johnny Robeson
167544bcbe add F405 to flake8 ignore list 2016-06-16 02:43:01 -04:00
Johnny Robeson
7ab0964826 add C901 (function complexity)to flake8 ignore list
I'm adding this both as a TODO item and to work around flake8 preferring
global ($HOME) configuration over project
2016-06-03 16:10:31 -04:00
Jack Wilsdon
10ce4fa8c5 Re-add min-version for flake8 in setup.cfg 2016-06-03 02:44:37 +01:00
Jack Wilsdon
82df8d18df Update tox configuration
- Add support for Python 3 testing.
 - Add Python 3.3, 3.4 and 3.5 tests to Travis and AppVeyor.
 - Allow arguments to be passed to tox from test matrix.
 - Simplify tox configuration so that we now only have `test`, `flake8`
   and `docs` tasks.
2016-06-03 00:46:02 +01:00
Johnny Robeson
32d4545b5e set min-version to 2.7 in setup.cfg 2016-05-30 16:32:34 -04:00
Jack Wilsdon
205f868a20 Add description for all errors we ignore 2016-04-16 01:26:47 +02:00
Adrian Sampson
53b5faf7a8 Add __future__ import style checker
This adds the [flake8-future-import][f] plugin for flake8, which enforces the
standard set of `__future__` imports at the top of all Python files. This
revealed a fair number of files that need to be fixed.

To be revisited after #1887 is merged.

[f]: https://github.com/xZise/flake8-future-import
2016-04-16 01:26:47 +02:00
Adrian Sampson
e7f8a627e9 Style fixes for pep8 1.6 2015-02-07 12:51:54 -08:00
Fabrice Laporte
356c1f44b5 nosetests: don't run slow tests by default 2014-11-06 22:46:42 +01:00
Thomas Scholtes
98ae8cbbc9 Make tests conform to PEP8 2014-09-09 22:31:46 +02:00
Adrian Sampson
908584bde8 Revamp FormattedItemMapping
This subclass was not cleanly conforming to the Mapping abstract base. Now
we're in business -- the thing looks like a dict. Brought up by #782.
2014-05-20 16:24:40 -07:00
Adrian Sampson
5f4a9c6446 fix Windows path manipulation in importfeeds 2014-04-18 15:52:23 -07:00
Thomas Scholtes
a6aed22ddd Flake8 fixes 2014-04-17 12:25:59 +02:00
Thomas Scholtes
4b012e5ddf Import tests use TestHelper
Removes duplicate code, increases speed and makes some files clake8 clean.
2014-04-15 14:57:01 +02:00
Adrian Sampson
03bea61ac0 commands.py is flake8-clean 2014-04-14 10:53:32 -07:00
Adrian Sampson
a45ac4a9d6 enable unused import checking
The "noqa" marker is for exceptions such as these.
2014-04-13 20:48:30 -07:00
Adrian Sampson
469489e3a7 flake8 cleanup in library and functemplate 2014-04-13 20:39:56 -07:00
Adrian Sampson
e21c04e912 flake8-cleanliness in missing
This is a little bit dumb, but one way to get the style checker to accept the
nice alignment in this plugin is to make it a dict.
2014-04-13 17:59:17 -07:00
Adrian Sampson
237458fbb6 a bit more flake8 bashing 2014-04-12 14:03:00 -07:00
Thomas Scholtes
1670cb4565 Flake8 fixes 2014-04-11 16:05:08 +02:00
Thomas Scholtes
883e3b3bc7 Flake8 fixes 2014-04-10 15:56:50 +02:00
Thomas Scholtes
b9dca9b43e Make flake8 mandatory on travis
The travis build will fail if flake8 finds errors. Since not all code is
cleaned yet we ignore a couple of files in `setup.cfg`.

We'll gradualy clean the code remove the excluded files from `setup.cfg`.

See #669.
2014-04-09 19:20:01 +02:00
Thomas Scholtes
bee80c4c49 Use tox to test on travis and add docs and flake8
Travis CI now also confirm that the docs build correctly and the flake8 runs
succesfully. Tox also has the advantage that it tests that beets installs
correctly.

Currently flake8 does not run succesfully so it is configured to not fail the
build on Travis.
2014-04-02 22:48:53 +02:00
Thomas Scholtes
d21406dcb0 Use nose to capture logs during test
Set the loglevel of beets to `DEBUG` but capture all logging statements with
nose. The logs are only printed when a test fails. This gives us more
information when tests fail while being completely silent on success.
2014-03-23 21:12:08 +01:00