Skip to content

Commit 92e06e7

Browse files
[pre-commit.ci] pre-commit autoupdate (#314)
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 de27e5b commit 92e06e7

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ repos:
3535
- id: reorder-python-imports
3636
args: [--py37-plus, --add-import, 'from __future__ import annotations']
3737
- repo: https://github.com/asottile/pyupgrade
38-
rev: v3.2.0
38+
rev: v3.2.2
3939
hooks:
4040
- id: pyupgrade
4141
args: [--py37-plus]
@@ -73,7 +73,7 @@ repos:
7373
Pygments,
7474
]
7575
- repo: https://github.com/dosisod/refurb
76-
rev: v1.5.0
76+
rev: v1.7.0
7777
hooks:
7878
- id: refurb
7979
args: [--ignore, FURB126]
@@ -128,7 +128,7 @@ repos:
128128
args: [--no-build-isolation]
129129
additional_dependencies: [setuptools-scm, toml]
130130
- repo: https://github.com/pre-commit/mirrors-mypy
131-
rev: 'v0.982'
131+
rev: 'v0.990'
132132
hooks:
133133
- id: mypy
134134
args: [

src/_pytask/console.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def _get_file(function: Callable[..., Any], skipped_paths: list[Path] = None) ->
207207
hasattr(function, "__wrapped__")
208208
and Path(inspect.getsourcefile(function)) in skipped_paths
209209
):
210-
return _get_file(function.__wrapped__) # type: ignore[attr-defined]
210+
return _get_file(function.__wrapped__)
211211
else:
212212
return Path(inspect.getsourcefile(function))
213213

@@ -217,7 +217,7 @@ def _get_source_lines(function: Callable[..., Any]) -> int:
217217
if isinstance(function, functools.partial):
218218
return _get_source_lines(function.func)
219219
elif hasattr(function, "__wrapped__"):
220-
return _get_source_lines(function.__wrapped__) # type: ignore[attr-defined]
220+
return _get_source_lines(function.__wrapped__)
221221
else:
222222
return inspect.getsourcelines(function)[1]
223223

src/_pytask/mark/structures.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def __call__(self, *args: Any, **kwargs: Any) -> MarkDecorator:
124124
def get_unpacked_marks(obj: Callable[..., Any]) -> list[Mark]:
125125
"""Obtain the unpacked marks that are stored on an object."""
126126
if hasattr(obj, "pytask_meta"):
127-
mark_list = obj.pytask_meta.markers # type: ignore[attr-defined]
127+
mark_list = obj.pytask_meta.markers
128128
else:
129129
mark_list = []
130130
return normalize_mark_list(mark_list)
@@ -157,9 +157,7 @@ def store_mark(obj: Callable[..., Any], mark: Mark) -> None:
157157
"""
158158
assert isinstance(mark, Mark), mark
159159
if hasattr(obj, "pytask_meta"):
160-
obj.pytask_meta.markers = get_unpacked_marks( # type: ignore[attr-defined]
161-
obj
162-
) + [mark]
160+
obj.pytask_meta.markers = get_unpacked_marks(obj) + [mark]
163161
else:
164162
obj.pytask_meta = CollectionMetadata( # type: ignore[attr-defined]
165163
markers=[mark]

0 commit comments

Comments
 (0)