Upgrade pydocstyle/flake8-docstrings

See #3320
This commit is contained in:
Florian Bruhin 2017-11-26 19:50:13 +01:00
parent 7520a365eb
commit b5dd647678
8 changed files with 15 additions and 13 deletions

View File

@ -19,18 +19,22 @@ exclude = .*,__pycache__,resources.py
# D103: Missing docstring in public function (will be handled by others)
# D104: Missing docstring in public package (will be handled by others)
# D105: Missing docstring in magic method (will be handled by others)
# D106: Missing docstring in public nested class (will be handled by others)
# D107: Missing docstring in __init__ (will be handled by others)
# D209: Blank line before closing """ (removed from PEP257)
# D211: No blank lines allowed before class docstring
# (PEP257 got changed, but let's stick to the old standard)
# D401: First line should be in imperative mood (okay sometimes)
# D402: First line should not be function's signature (false-positives)
# D403: First word of the first line should be properly capitalized
# (false-positives)
# D413: Missing blank line after last section (not in pep257?)
ignore =
E128,E226,E265,E501,E402,E266,E722,E731,
F401,
N802,
P101,P102,P103,
D102,D103,D104,D105,D209,D211,D402,D403
D102,D103,D106,D107,D104,D105,D209,D211,D401,D402,D403,D413
min-version = 3.4.0
max-complexity = 12
per-file-ignores =

View File

@ -4,7 +4,7 @@ flake8==3.5.0
flake8-copyright==0.2.0
flake8-debugger==3.0.0
flake8-deprecated==1.3
flake8-docstrings==1.0.3 # rq.filter: < 1.1.0
flake8-docstrings==1.1.0
flake8-future-import==0.4.3
flake8-mock==0.3
flake8-pep3101==1.0 # rq.filter: < 1.1
@ -16,6 +16,7 @@ flake8-tuple==0.2.13
mccabe==0.6.1
pep8-naming==0.4.1
pycodestyle==2.3.1
pydocstyle==1.1.1 # rq.filter: < 2.0.0
pydocstyle==2.1.1
pyflakes==1.6.0
six==1.11.0
snowballstemmer==1.2.1

View File

@ -2,7 +2,7 @@ flake8
flake8-copyright
flake8-debugger
flake8-deprecated
flake8-docstrings<1.1.0
flake8-docstrings
flake8-future-import
flake8-mock
flake8-pep3101<1.1
@ -11,10 +11,8 @@ flake8-string-format
flake8-tidy-imports
flake8-tuple
pep8-naming
pydocstyle<2.0.0
pydocstyle
pyflakes
# Not upgraded yet because they introduce new errors
#@ filter: pydocstyle < 2.0.0
#@ filter: flake8-docstrings < 1.1.0
#@ filter: flake8-pep3101 < 1.1

View File

@ -215,7 +215,7 @@ class DownloadItem(downloads.AbstractDownloadItem):
abort_on=[self.cancelled, self.error])
def _set_fileobj(self, fileobj, *, autoclose=True):
""""Set the file object to write the download to.
"""Set the file object to write the download to.
Args:
fileobj: A file-like object.

View File

@ -95,7 +95,6 @@ class CommandParser:
"""Parse qutebrowser commandline commands.
Attributes:
_partial_match: Whether to allow partial command matches.
"""

View File

@ -386,7 +386,7 @@ def generate_commands(filename):
def _generate_setting_backend_info(f, opt):
""""Generate backend information for the given option."""
"""Generate backend information for the given option."""
all_backends = [usertypes.Backend.QtWebKit, usertypes.Backend.QtWebEngine]
if opt.raw_backends is not None:
for name, conditional in sorted(opt.raw_backends.items()):

View File

@ -581,7 +581,7 @@ class TestAttachment:
header_checker.check_ignored('attachment; filename=bar foo=foo')
def test_attmissingdelim3(self, header_checker):
"""";" missing between disposition type and filename parameter.
"""';' missing between disposition type and filename parameter.
This is invalid, so UAs should ignore it.
"""

View File

@ -129,14 +129,14 @@ def test_nextitem_previtem_chain(hist):
def test_nextitem_index_error(hist):
""""Test nextitem() when _tmphist raises an IndexError."""
"""Test nextitem() when _tmphist raises an IndexError."""
hist.start('f')
with pytest.raises(cmdhistory.HistoryEndReachedError):
hist.nextitem()
def test_previtem_index_error(hist):
""""Test previtem() when _tmphist raises an IndexError."""
"""Test previtem() when _tmphist raises an IndexError."""
hist.start('f')
with pytest.raises(cmdhistory.HistoryEndReachedError):
for _ in range(10):