Skip to content

Commit b96e162

Browse files
authored
Merge pull request #4693 from asottile/flake8_3_7_0
fixes for flake8 3.7
2 parents 5119abe + acece23 commit b96e162

File tree

6 files changed

+15
-12
lines changed

6 files changed

+15
-12
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
exclude: doc/en/example/py2py3/test_py2.py
22
repos:
33
- repo: https://github.com/ambv/black
4-
rev: 18.6b4
4+
rev: 18.9b0
55
hooks:
66
- id: black
77
args: [--safe, --quiet]
@@ -13,28 +13,31 @@ repos:
1313
additional_dependencies: [black==18.9b0]
1414
language_version: python3
1515
- repo: https://github.com/pre-commit/pre-commit-hooks
16-
rev: v2.0.0
16+
rev: v2.1.0
1717
hooks:
1818
- id: trailing-whitespace
1919
- id: end-of-file-fixer
2020
- id: check-yaml
2121
- id: debug-statements
2222
exclude: _pytest/debugging.py
2323
language_version: python3
24+
- repo: https://gitlab.com/pycqa/flake8
25+
rev: 3.7.0
26+
hooks:
2427
- id: flake8
2528
language_version: python3
2629
- repo: https://github.com/asottile/reorder_python_imports
27-
rev: v1.3.3
30+
rev: v1.3.5
2831
hooks:
2932
- id: reorder-python-imports
3033
args: ['--application-directories=.:src']
3134
- repo: https://github.com/asottile/pyupgrade
32-
rev: v1.10.1
35+
rev: v1.11.1
3336
hooks:
3437
- id: pyupgrade
3538
args: [--keep-percent-format]
3639
- repo: https://github.com/pre-commit/pygrep-hooks
37-
rev: v1.1.0
40+
rev: v1.2.0
3841
hooks:
3942
- id: rst-backticks
4043
- repo: local

src/_pytest/config/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ def _importconftest(self, conftestpath):
437437
and not self._using_pyargs
438438
):
439439
from _pytest.deprecated import (
440-
PYTEST_PLUGINS_FROM_NON_TOP_LEVEL_CONFTEST
440+
PYTEST_PLUGINS_FROM_NON_TOP_LEVEL_CONFTEST,
441441
)
442442

443443
fail(

src/_pytest/fixtures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ class FuncFixtureInfo(object):
307307
# fixture names specified via usefixtures and via autouse=True in fixture
308308
# definitions.
309309
initialnames = attr.ib(type=tuple)
310-
names_closure = attr.ib() # type: List[str]
311-
name2fixturedefs = attr.ib() # type: List[str, List[FixtureDef]]
310+
names_closure = attr.ib() # List[str]
311+
name2fixturedefs = attr.ib() # List[str, List[FixtureDef]]
312312

313313
def prune_dependency_tree(self):
314314
"""Recompute names_closure from initialnames and name2fixturedefs

src/_pytest/logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def __init__(self, item):
217217
"""Creates a new funcarg."""
218218
self._item = item
219219
# dict of log name -> log level
220-
self._initial_log_levels = {} # type: Dict[str, int]
220+
self._initial_log_levels = {} # Dict[str, int]
221221

222222
def _finalize(self):
223223
"""Finalizes the fixture.

src/_pytest/mark/structures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ class Mark(object):
143143
#: name of the mark
144144
name = attr.ib(type=str)
145145
#: positional arguments of the mark decorator
146-
args = attr.ib() # type: List[object]
146+
args = attr.ib() # List[object]
147147
#: keyword arguments of the mark decorator
148-
kwargs = attr.ib() # type: Dict[str, object]
148+
kwargs = attr.ib() # Dict[str, object]
149149

150150
def combined_with(self, other):
151151
"""

src/_pytest/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class CallInfo(object):
204204
""" Result/Exception info a function invocation. """
205205

206206
_result = attr.ib()
207-
# type: Optional[ExceptionInfo]
207+
# Optional[ExceptionInfo]
208208
excinfo = attr.ib()
209209
start = attr.ib()
210210
stop = attr.ib()

0 commit comments

Comments
 (0)