fixes for flake8 3.7

This commit is contained in:
Anthony Sottile 2019-01-29 21:11:15 -08:00
parent 5119abe498
commit e5f823a3a7
5 changed files with 9 additions and 6 deletions

View File

@ -21,6 +21,9 @@ repos:
- id: debug-statements
exclude: _pytest/debugging.py
language_version: python3
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.0
hooks:
- id: flake8
language_version: python3
- repo: https://github.com/asottile/reorder_python_imports

View File

@ -307,8 +307,8 @@ class FuncFixtureInfo(object):
# fixture names specified via usefixtures and via autouse=True in fixture
# definitions.
initialnames = attr.ib(type=tuple)
names_closure = attr.ib() # type: List[str]
name2fixturedefs = attr.ib() # type: List[str, List[FixtureDef]]
names_closure = attr.ib() # List[str]
name2fixturedefs = attr.ib() # List[str, List[FixtureDef]]
def prune_dependency_tree(self):
"""Recompute names_closure from initialnames and name2fixturedefs

View File

@ -217,7 +217,7 @@ class LogCaptureFixture(object):
"""Creates a new funcarg."""
self._item = item
# dict of log name -> log level
self._initial_log_levels = {} # type: Dict[str, int]
self._initial_log_levels = {} # Dict[str, int]
def _finalize(self):
"""Finalizes the fixture.

View File

@ -143,9 +143,9 @@ class Mark(object):
#: name of the mark
name = attr.ib(type=str)
#: positional arguments of the mark decorator
args = attr.ib() # type: List[object]
args = attr.ib() # List[object]
#: keyword arguments of the mark decorator
kwargs = attr.ib() # type: Dict[str, object]
kwargs = attr.ib() # Dict[str, object]
def combined_with(self, other):
"""

View File

@ -204,7 +204,7 @@ class CallInfo(object):
""" Result/Exception info a function invocation. """
_result = attr.ib()
# type: Optional[ExceptionInfo]
# Optional[ExceptionInfo]
excinfo = attr.ib()
start = attr.ib()
stop = attr.ib()