Update flake8 & plugins (#251)
Additionally, this adds some hackery to let flake8 read its config from pyproject.toml.
This commit is contained in:
parent
94aa153b0e
commit
9dbde1bdba
9 changed files with 33 additions and 20 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,6 +5,7 @@
|
|||
/.coverage
|
||||
/.eggs
|
||||
/.tox
|
||||
/.venv
|
||||
/Comics
|
||||
/build
|
||||
/dist
|
||||
|
|
|
@ -86,7 +86,7 @@ class ComicFury(ParserScraper):
|
|||
not data.xpath('//div[@id="comicimagewrap"]//img'))
|
||||
|
||||
@classmethod
|
||||
def getmodules(cls): # noqa: Allowed to be long
|
||||
def getmodules(cls): # noqa: CFQ001
|
||||
return (
|
||||
# Cannot be found via search?!?
|
||||
cls('BadassologyByMichaelBay', 'strudelology'),
|
||||
|
|
|
@ -31,7 +31,7 @@ class ComicsKingdom(ParserScraper):
|
|||
})
|
||||
|
||||
@classmethod
|
||||
def getmodules(cls): # noqa: Allowed to be long
|
||||
def getmodules(cls): # noqa: CFQ001
|
||||
return (
|
||||
# Some comics are not listed on the "all" page (too old?)
|
||||
cls('Retail', 'retail'),
|
||||
|
|
|
@ -34,7 +34,7 @@ class GoComics(ParserScraper):
|
|||
return data.xpath('//img[contains(@src, "content-error-missing")]')
|
||||
|
||||
@classmethod
|
||||
def getmodules(cls): # noqa: Allowed to be long
|
||||
def getmodules(cls): # noqa: CFQ001
|
||||
return (
|
||||
# old comics removed from the listing
|
||||
cls('HeavenlyNostrils', 'heavenly-nostrils'),
|
||||
|
|
|
@ -28,7 +28,7 @@ class Removed(Scraper):
|
|||
return {'rem-' + self.reason: self.REASONS[self.reason]}
|
||||
|
||||
@classmethod
|
||||
def getmodules(cls): # noqa: Allowed to be long
|
||||
def getmodules(cls): # noqa: CFQ001
|
||||
return (
|
||||
# Removed in 2.16
|
||||
cls('AbleAndBaker'),
|
||||
|
@ -1600,7 +1600,7 @@ class Renamed(Scraper):
|
|||
return {'ren-%i' % self.i: self.MSG % self.newname}
|
||||
|
||||
@classmethod
|
||||
def getmodules(cls): # noqa: Allowed to be long
|
||||
def getmodules(cls):
|
||||
return (
|
||||
# Renamed in 2.16
|
||||
cls('1997', '1977'),
|
||||
|
|
|
@ -45,7 +45,7 @@ class WebToons(ParserScraper):
|
|||
return "%s-%03d.%s" % (episodeNum, imageNum, imageExt)
|
||||
|
||||
@classmethod
|
||||
def getmodules(cls): # noqa: Allowed to be long
|
||||
def getmodules(cls): # noqa: CFQ001
|
||||
return (
|
||||
cls('1000', 'action/one-thousand', 1217),
|
||||
cls('10thDimensionBoys', 'comedy/10th-dimension-boys', 71),
|
||||
|
|
|
@ -3,3 +3,18 @@ requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]
|
|||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.setuptools_scm]
|
||||
|
||||
[tool.flake8]
|
||||
max_line_length = 100
|
||||
ignore = [
|
||||
'E127', 'E128', # hanging instead of visual indent
|
||||
'FI18', 'FI58', # ignore __future__ "annotations" for now
|
||||
'W504' # line breaks after binary operator
|
||||
]
|
||||
noqa-require-code = true
|
||||
no-accept-encodings = true
|
||||
min-version = "3.7"
|
||||
extend-exclude = [
|
||||
'.venv',
|
||||
'build',
|
||||
]
|
||||
|
|
15
setup.cfg
15
setup.cfg
|
@ -55,7 +55,12 @@ css =
|
|||
cssselect
|
||||
dev =
|
||||
allure-pytest
|
||||
flake8<4
|
||||
pytest-cov
|
||||
pytest-xdist
|
||||
responses
|
||||
setup-cfg-fmt
|
||||
lint =
|
||||
flake8<6
|
||||
flake8-2020
|
||||
flake8-breakpoint
|
||||
flake8-bugbear
|
||||
|
@ -64,15 +69,13 @@ dev =
|
|||
flake8-comprehensions
|
||||
flake8-eradicate
|
||||
flake8-fixme
|
||||
flake8-functions==0.0.4
|
||||
flake8-functions
|
||||
flake8-future-import
|
||||
flake8-logging-format
|
||||
flake8-noqa
|
||||
Flake8-pyproject
|
||||
flake8-pytest
|
||||
flake8-pytest-style
|
||||
pytest-cov
|
||||
pytest-xdist
|
||||
responses
|
||||
setup-cfg-fmt
|
||||
|
||||
[bdist_wheel]
|
||||
universal = 1
|
||||
|
|
10
tox.ini
10
tox.ini
|
@ -31,14 +31,8 @@ extras =
|
|||
commands =
|
||||
- {envbindir}/flake8 --format=pylint \
|
||||
--tee --output-file={toxworkdir}/flake8.log
|
||||
|
||||
[flake8]
|
||||
# we aim for 79, but this suppresses warnings for now...
|
||||
max-line-length = 100
|
||||
ignore = E127,E128,E241,FI12,FI14,FI15,FI18,FI50,FI51,FI53,FI54,FI55,FI58,W504
|
||||
require-code = True
|
||||
no-accept-encodings = True
|
||||
min-version = 3.7
|
||||
extras =
|
||||
lint
|
||||
|
||||
# Duplicated for CodeClimate...
|
||||
[pep8]
|
||||
|
|
Loading…
Reference in a new issue