Skip to content

Commit 022ac9b

Browse files
authored
Merge pull request #7846 from asottile/py36_black
py36+: update the target version of black to py36
2 parents 3b957c2 + f295b02 commit 022ac9b

16 files changed

+28
-28
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ template = "changelog/_template.rst"
102102
showcontent = true
103103

104104
[tool.black]
105-
target-version = ['py35']
105+
target-version = ['py36']

src/_pytest/_io/saferepr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def _pformat_dispatch(
122122
width: int = 80,
123123
depth: Optional[int] = None,
124124
*,
125-
compact: bool = False
125+
compact: bool = False,
126126
) -> str:
127127
return AlwaysDispatchingPrettyPrinter(
128128
indent=indent, width=width, depth=depth, compact=compact

src/_pytest/_io/terminalwriter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def sep(
109109
sepchar: str,
110110
title: Optional[str] = None,
111111
fullwidth: Optional[int] = None,
112-
**markup: bool
112+
**markup: bool,
113113
) -> None:
114114
if fullwidth is None:
115115
fullwidth = self.fullwidth

src/_pytest/compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def getfuncargnames(
115115
*,
116116
name: str = "",
117117
is_method: bool = False,
118-
cls: Optional[type] = None
118+
cls: Optional[type] = None,
119119
) -> Tuple[str, ...]:
120120
"""Return the names of a function's mandatory arguments.
121121

src/_pytest/config/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ def __init__(
866866
self,
867867
pluginmanager: PytestPluginManager,
868868
*,
869-
invocation_params: Optional[InvocationParams] = None
869+
invocation_params: Optional[InvocationParams] = None,
870870
) -> None:
871871
from .argparsing import Parser, FILE_OR_DIR
872872

src/_pytest/doctest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def from_parent( # type: ignore
260260
*,
261261
name: str,
262262
runner: "doctest.DocTestRunner",
263-
dtest: "doctest.DocTest"
263+
dtest: "doctest.DocTest",
264264
):
265265
# incompatible signature due to to imposed limits on sublcass
266266
"""The public named constructor."""

src/_pytest/fixtures.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ def fixture(
12201220
Callable[[Any], Optional[object]],
12211221
]
12221222
] = ...,
1223-
name: Optional[str] = ...
1223+
name: Optional[str] = ...,
12241224
) -> _FixtureFunction:
12251225
...
12261226

@@ -1238,7 +1238,7 @@ def fixture(
12381238
Callable[[Any], Optional[object]],
12391239
]
12401240
] = ...,
1241-
name: Optional[str] = None
1241+
name: Optional[str] = None,
12421242
) -> FixtureFunctionMarker:
12431243
...
12441244

@@ -1255,7 +1255,7 @@ def fixture(
12551255
Callable[[Any], Optional[object]],
12561256
]
12571257
] = None,
1258-
name: Optional[str] = None
1258+
name: Optional[str] = None,
12591259
) -> Union[FixtureFunctionMarker, _FixtureFunction]:
12601260
"""Decorator to mark a fixture factory function.
12611261
@@ -1325,7 +1325,7 @@ def yield_fixture(
13251325
params=None,
13261326
autouse=False,
13271327
ids=None,
1328-
name=None
1328+
name=None,
13291329
):
13301330
"""(Return a) decorator to mark a yield-fixture factory function.
13311331

src/_pytest/mark/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
def param(
4848
*values: object,
4949
marks: Union[MarkDecorator, Collection[Union[MarkDecorator, Mark]]] = (),
50-
id: Optional[str] = None
50+
id: Optional[str] = None,
5151
) -> ParameterSet:
5252
"""Specify a parameter in `pytest.mark.parametrize`_ calls or
5353
:ref:`parametrized fixtures <fixture-parametrize-marks>`.

src/_pytest/mark/structures.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def param(
8989
cls,
9090
*values: object,
9191
marks: Union["MarkDecorator", Collection[Union["MarkDecorator", "Mark"]]] = (),
92-
id: Optional[str] = None
92+
id: Optional[str] = None,
9393
) -> "ParameterSet":
9494
if isinstance(marks, MarkDecorator):
9595
marks = (marks,)
@@ -138,7 +138,7 @@ def _parse_parametrize_args(
138138
argnames: Union[str, List[str], Tuple[str, ...]],
139139
argvalues: Iterable[Union["ParameterSet", Sequence[object], object]],
140140
*args,
141-
**kwargs
141+
**kwargs,
142142
) -> Tuple[Union[List[str], Tuple[str, ...]], bool]:
143143
if not isinstance(argnames, (tuple, list)):
144144
argnames = [x.strip() for x in argnames.split(",") if x.strip()]
@@ -398,7 +398,7 @@ def __call__( # type: ignore[override]
398398
self,
399399
condition: Union[str, bool] = ...,
400400
*conditions: Union[str, bool],
401-
reason: str = ...
401+
reason: str = ...,
402402
) -> MarkDecorator:
403403
...
404404

@@ -415,7 +415,7 @@ def __call__(
415415
reason: str = ...,
416416
run: bool = ...,
417417
raises: Union[Type[BaseException], Tuple[Type[BaseException], ...]] = ...,
418-
strict: bool = ...
418+
strict: bool = ...,
419419
) -> MarkDecorator:
420420
...
421421

@@ -432,7 +432,7 @@ def __call__( # type: ignore[override]
432432
Callable[[Any], Optional[object]],
433433
]
434434
] = ...,
435-
scope: Optional[_Scope] = ...
435+
scope: Optional[_Scope] = ...,
436436
) -> MarkDecorator:
437437
...
438438

src/_pytest/pathlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ class ImportPathMismatchError(ImportError):
441441
def import_path(
442442
p: Union[str, py.path.local, Path],
443443
*,
444-
mode: Union[str, ImportMode] = ImportMode.prepend
444+
mode: Union[str, ImportMode] = ImportMode.prepend,
445445
) -> ModuleType:
446446
"""Import and return a module from the given path, which can be a file (a module) or
447447
a directory (a package).

src/_pytest/pytester.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,7 @@ def popen(
12111211
stdout=subprocess.PIPE,
12121212
stderr=subprocess.PIPE,
12131213
stdin=CLOSE_STDIN,
1214-
**kw
1214+
**kw,
12151215
):
12161216
"""Invoke subprocess.Popen.
12171217
@@ -1530,7 +1530,7 @@ def _match_lines(
15301530
match_func: Callable[[str, str], bool],
15311531
match_nickname: str,
15321532
*,
1533-
consecutive: bool = False
1533+
consecutive: bool = False,
15341534
) -> None:
15351535
"""Underlying implementation of ``fnmatch_lines`` and ``re_match_lines``.
15361536

src/_pytest/python.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ def parametrize(
975975
] = None,
976976
scope: "Optional[_Scope]" = None,
977977
*,
978-
_param_mark: Optional[Mark] = None
978+
_param_mark: Optional[Mark] = None,
979979
) -> None:
980980
"""Add new invocations to the underlying test function using the list
981981
of argvalues for the given argnames. Parametrization is performed

src/_pytest/python_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ def _is_numpy_array(obj: object) -> bool:
559559
def raises(
560560
expected_exception: Union[Type[_E], Tuple[Type[_E], ...]],
561561
*,
562-
match: Optional[Union[str, Pattern[str]]] = ...
562+
match: Optional[Union[str, Pattern[str]]] = ...,
563563
) -> "RaisesContext[_E]":
564564
...
565565

@@ -569,7 +569,7 @@ def raises(
569569
expected_exception: Union[Type[_E], Tuple[Type[_E], ...]],
570570
func: Callable[..., Any],
571571
*args: Any,
572-
**kwargs: Any
572+
**kwargs: Any,
573573
) -> _pytest._code.ExceptionInfo[_E]:
574574
...
575575

src/_pytest/recwarn.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def deprecated_call(
8383
def warns(
8484
expected_warning: Optional[Union[Type[Warning], Tuple[Type[Warning], ...]]],
8585
*,
86-
match: Optional[Union[str, Pattern[str]]] = ...
86+
match: Optional[Union[str, Pattern[str]]] = ...,
8787
) -> "WarningsChecker":
8888
...
8989

@@ -93,7 +93,7 @@ def warns(
9393
expected_warning: Optional[Union[Type[Warning], Tuple[Type[Warning], ...]]],
9494
func: Callable[..., T],
9595
*args: Any,
96-
**kwargs: Any
96+
**kwargs: Any,
9797
) -> T:
9898
...
9999

@@ -102,7 +102,7 @@ def warns(
102102
expected_warning: Optional[Union[Type[Warning], Tuple[Type[Warning], ...]]],
103103
*args: Any,
104104
match: Optional[Union[str, Pattern[str]]] = None,
105-
**kwargs: Any
105+
**kwargs: Any,
106106
) -> Union["WarningsChecker", Any]:
107107
r"""Assert that code raises a particular class of warning.
108108

src/_pytest/reports.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def __init__(
246246
sections: Iterable[Tuple[str, str]] = (),
247247
duration: float = 0,
248248
user_properties: Optional[Iterable[Tuple[str, object]]] = None,
249-
**extra
249+
**extra,
250250
) -> None:
251251
#: Normalized collection nodeid.
252252
self.nodeid = nodeid
@@ -348,7 +348,7 @@ def __init__(
348348
longrepr,
349349
result: Optional[List[Union[Item, Collector]]],
350350
sections: Iterable[Tuple[str, str]] = (),
351-
**extra
351+
**extra,
352352
) -> None:
353353
#: Normalized collection nodeid.
354354
self.nodeid = nodeid

src/_pytest/terminal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ def write_sep(
450450
sep: str,
451451
title: Optional[str] = None,
452452
fullwidth: Optional[int] = None,
453-
**markup: bool
453+
**markup: bool,
454454
) -> None:
455455
self.ensure_newline()
456456
self._tw.sep(sep, title, fullwidth, **markup)

0 commit comments

Comments
 (0)