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
|
/.coverage
|
||||||
/.eggs
|
/.eggs
|
||||||
/.tox
|
/.tox
|
||||||
|
/.venv
|
||||||
/Comics
|
/Comics
|
||||||
/build
|
/build
|
||||||
/dist
|
/dist
|
||||||
|
|
|
@ -86,7 +86,7 @@ class ComicFury(ParserScraper):
|
||||||
not data.xpath('//div[@id="comicimagewrap"]//img'))
|
not data.xpath('//div[@id="comicimagewrap"]//img'))
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def getmodules(cls): # noqa: Allowed to be long
|
def getmodules(cls): # noqa: CFQ001
|
||||||
return (
|
return (
|
||||||
# Cannot be found via search?!?
|
# Cannot be found via search?!?
|
||||||
cls('BadassologyByMichaelBay', 'strudelology'),
|
cls('BadassologyByMichaelBay', 'strudelology'),
|
||||||
|
|
|
@ -31,7 +31,7 @@ class ComicsKingdom(ParserScraper):
|
||||||
})
|
})
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def getmodules(cls): # noqa: Allowed to be long
|
def getmodules(cls): # noqa: CFQ001
|
||||||
return (
|
return (
|
||||||
# Some comics are not listed on the "all" page (too old?)
|
# Some comics are not listed on the "all" page (too old?)
|
||||||
cls('Retail', 'retail'),
|
cls('Retail', 'retail'),
|
||||||
|
|
|
@ -34,7 +34,7 @@ class GoComics(ParserScraper):
|
||||||
return data.xpath('//img[contains(@src, "content-error-missing")]')
|
return data.xpath('//img[contains(@src, "content-error-missing")]')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def getmodules(cls): # noqa: Allowed to be long
|
def getmodules(cls): # noqa: CFQ001
|
||||||
return (
|
return (
|
||||||
# old comics removed from the listing
|
# old comics removed from the listing
|
||||||
cls('HeavenlyNostrils', 'heavenly-nostrils'),
|
cls('HeavenlyNostrils', 'heavenly-nostrils'),
|
||||||
|
|
|
@ -28,7 +28,7 @@ class Removed(Scraper):
|
||||||
return {'rem-' + self.reason: self.REASONS[self.reason]}
|
return {'rem-' + self.reason: self.REASONS[self.reason]}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def getmodules(cls): # noqa: Allowed to be long
|
def getmodules(cls): # noqa: CFQ001
|
||||||
return (
|
return (
|
||||||
# Removed in 2.16
|
# Removed in 2.16
|
||||||
cls('AbleAndBaker'),
|
cls('AbleAndBaker'),
|
||||||
|
@ -1600,7 +1600,7 @@ class Renamed(Scraper):
|
||||||
return {'ren-%i' % self.i: self.MSG % self.newname}
|
return {'ren-%i' % self.i: self.MSG % self.newname}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def getmodules(cls): # noqa: Allowed to be long
|
def getmodules(cls):
|
||||||
return (
|
return (
|
||||||
# Renamed in 2.16
|
# Renamed in 2.16
|
||||||
cls('1997', '1977'),
|
cls('1997', '1977'),
|
||||||
|
|
|
@ -45,7 +45,7 @@ class WebToons(ParserScraper):
|
||||||
return "%s-%03d.%s" % (episodeNum, imageNum, imageExt)
|
return "%s-%03d.%s" % (episodeNum, imageNum, imageExt)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def getmodules(cls): # noqa: Allowed to be long
|
def getmodules(cls): # noqa: CFQ001
|
||||||
return (
|
return (
|
||||||
cls('1000', 'action/one-thousand', 1217),
|
cls('1000', 'action/one-thousand', 1217),
|
||||||
cls('10thDimensionBoys', 'comedy/10th-dimension-boys', 71),
|
cls('10thDimensionBoys', 'comedy/10th-dimension-boys', 71),
|
||||||
|
|
|
@ -3,3 +3,18 @@ requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[tool.setuptools_scm]
|
[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
|
cssselect
|
||||||
dev =
|
dev =
|
||||||
allure-pytest
|
allure-pytest
|
||||||
flake8<4
|
pytest-cov
|
||||||
|
pytest-xdist
|
||||||
|
responses
|
||||||
|
setup-cfg-fmt
|
||||||
|
lint =
|
||||||
|
flake8<6
|
||||||
flake8-2020
|
flake8-2020
|
||||||
flake8-breakpoint
|
flake8-breakpoint
|
||||||
flake8-bugbear
|
flake8-bugbear
|
||||||
|
@ -64,15 +69,13 @@ dev =
|
||||||
flake8-comprehensions
|
flake8-comprehensions
|
||||||
flake8-eradicate
|
flake8-eradicate
|
||||||
flake8-fixme
|
flake8-fixme
|
||||||
flake8-functions==0.0.4
|
flake8-functions
|
||||||
flake8-future-import
|
flake8-future-import
|
||||||
flake8-logging-format
|
flake8-logging-format
|
||||||
|
flake8-noqa
|
||||||
|
Flake8-pyproject
|
||||||
flake8-pytest
|
flake8-pytest
|
||||||
flake8-pytest-style
|
flake8-pytest-style
|
||||||
pytest-cov
|
|
||||||
pytest-xdist
|
|
||||||
responses
|
|
||||||
setup-cfg-fmt
|
|
||||||
|
|
||||||
[bdist_wheel]
|
[bdist_wheel]
|
||||||
universal = 1
|
universal = 1
|
||||||
|
|
10
tox.ini
10
tox.ini
|
@ -31,14 +31,8 @@ extras =
|
||||||
commands =
|
commands =
|
||||||
- {envbindir}/flake8 --format=pylint \
|
- {envbindir}/flake8 --format=pylint \
|
||||||
--tee --output-file={toxworkdir}/flake8.log
|
--tee --output-file={toxworkdir}/flake8.log
|
||||||
|
extras =
|
||||||
[flake8]
|
lint
|
||||||
# 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
|
|
||||||
|
|
||||||
# Duplicated for CodeClimate...
|
# Duplicated for CodeClimate...
|
||||||
[pep8]
|
[pep8]
|
||||||
|
|
Loading…
Reference in a new issue