Skip to content

Commit 8975284

Browse files
[pre-commit.ci] pre-commit autoupdate (#154)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Tobias Raabe <[email protected]>
1 parent 2bbb8e7 commit 8975284

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

.pre-commit-config.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ repos:
3232
- id: rst-inline-touching-normal
3333
- id: text-unicode-replacement-char
3434
- repo: https://github.com/asottile/pyupgrade
35-
rev: v2.29.0
35+
rev: v2.29.1
3636
hooks:
3737
- id: pyupgrade
3838
args: [--py36-plus]
@@ -41,15 +41,15 @@ repos:
4141
hooks:
4242
- id: reorder-python-imports
4343
- repo: https://github.com/asottile/setup-cfg-fmt
44-
rev: v1.19.0
44+
rev: v1.20.0
4545
hooks:
4646
- id: setup-cfg-fmt
4747
- repo: https://github.com/psf/black
48-
rev: 21.10b0
48+
rev: 21.11b1
4949
hooks:
5050
- id: black
5151
- repo: https://github.com/asottile/blacken-docs
52-
rev: v1.11.0
52+
rev: v1.12.0
5353
hooks:
5454
- id: blacken-docs
5555
additional_dependencies: [black]
@@ -91,7 +91,7 @@ repos:
9191
hooks:
9292
- id: check-manifest
9393
- repo: https://github.com/guilatrova/tryceratops
94-
rev: v0.6.0
94+
rev: v1.0.0
9595
hooks:
9696
- id: tryceratops
9797
exclude: (console\.py|test_mark_expression\.py)

src/_pytask/parametrize.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def _parse_arg_names(arg_names: Union[str, Tuple[str], List[str]]) -> Tuple[str]
230230
elif isinstance(arg_names, (tuple, list)):
231231
out = tuple(arg_names)
232232
else:
233-
raise ValueError(
233+
raise TypeError(
234234
"The argument 'arg_names' accepts comma-separated strings, tuples and lists"
235235
f" of strings. It cannot accept {arg_names} with type {type(arg_names)}."
236236
)

src/_pytask/shared.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def reduce_node_name(node, paths: List[Path]):
144144
elif isinstance(node, MetaNode):
145145
name = relative_to(node.path, ancestor).as_posix()
146146
else:
147-
raise ValueError(f"Unknown node {node} with type '{type(node)}'.")
147+
raise TypeError(f"Unknown node {node} with type '{type(node)}'.")
148148

149149
return name
150150

tests/test_nodes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ class FalseNode:
236236
pytest.param(
237237
FalseNode(_ROOT.joinpath("src/module.py")),
238238
[_ROOT.joinpath("src")],
239-
pytest.raises(ValueError, match="Unknown node"),
239+
pytest.raises(TypeError, match="Unknown node"),
240240
None,
241241
id="throw error on unknown node type.",
242242
),

tests/test_parametrize.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ def test_parse_argnames(arg_names, expected):
119119
("i, j", does_not_raise()),
120120
(("i", "j"), does_not_raise()),
121121
(["i", "j"], does_not_raise()),
122-
(range(1, 2), pytest.raises(ValueError)),
123-
({"i": None, "j": None}, pytest.raises(ValueError)),
124-
({"i", "j"}, pytest.raises(ValueError)),
122+
(range(1, 2), pytest.raises(TypeError)),
123+
({"i": None, "j": None}, pytest.raises(TypeError)),
124+
({"i", "j"}, pytest.raises(TypeError)),
125125
],
126126
)
127127
def test_parse_argnames_raise_error(arg_names, expectation):

0 commit comments

Comments
 (0)