Skip to content

Commit e3fcf01

Browse files
[pre-commit.ci] pre-commit autoupdate (#73)
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 62e2ff8 commit e3fcf01

13 files changed

+18
-11
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ repos:
2626
- id: python-use-type-annotations
2727
- id: text-unicode-replacement-char
2828
- repo: https://github.com/astral-sh/ruff-pre-commit
29-
rev: v0.2.2
29+
rev: v0.3.4
3030
hooks:
3131
- id: ruff
3232
- id: ruff-format
3333
- repo: https://github.com/dosisod/refurb
34-
rev: v1.28.0
34+
rev: v2.0.0
3535
hooks:
3636
- id: refurb
3737
- repo: https://github.com/executablebooks/mdformat
@@ -49,7 +49,7 @@ repos:
4949
- id: codespell
5050
args: [-L als, -L falsy]
5151
- repo: https://github.com/pre-commit/mirrors-mypy
52-
rev: 'v1.8.0'
52+
rev: 'v1.9.0'
5353
hooks:
5454
- id: mypy
5555
additional_dependencies: [

pyproject.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,14 @@ unsafe-fixes = true
7373

7474
[tool.ruff.lint]
7575
extend-ignore = [
76-
# Others.
77-
"ANN101", # type annotating self
78-
"ANN102", # type annotating cls
7976
"ANN401", # Allow typing.Any.
8077
"COM812", # Comply with ruff-format
8178
"ISC001", # Comply with ruff-format
8279
]
8380
select = ["ALL"]
8481

8582
[tool.ruff.lint.per-file-ignores]
86-
"tests/*" = ["D", "ANN", "PLR2004", "S101"]
83+
"tests/*" = ["D", "ANN", "S101"]
8784

8885
[tool.ruff.lint.isort]
8986
force-single-line = true

src/pytask_latex/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Contains the main namespace."""
2+
23
from __future__ import annotations
34

45
try:

src/pytask_latex/collect.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Collect tasks."""
2+
23
from __future__ import annotations
34

45
import warnings

src/pytask_latex/compilation_steps.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ def compilation_step(path_to_tex: Path, path_to_document: Path):
1010
A compilation step constructor must yield a function with this signature.
1111
1212
"""
13+
1314
from __future__ import annotations
1415

1516
import subprocess

src/pytask_latex/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Configure pytask."""
2+
23
from __future__ import annotations
34

45
from typing import Any

src/pytask_latex/execute.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Execute tasks."""
2+
23
from __future__ import annotations
34

45
import shutil

src/pytask_latex/path.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Contains functions related to handling paths."""
2+
23
from __future__ import annotations
34

45
import os

src/pytask_latex/plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Entry-point for the plugin."""
2+
23
from __future__ import annotations
34

45
from typing import TYPE_CHECKING

src/pytask_latex/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Contains shared functions."""
2+
23
from __future__ import annotations
34

45
from typing import Any

tests/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Configuration file for pytest."""
2+
23
from __future__ import annotations
34

45
import os
@@ -29,7 +30,7 @@ class SysPathsSnapshot:
2930
"""A snapshot for sys.path."""
3031

3132
def __init__(self) -> None:
32-
self.__saved = list(sys.path), list(sys.meta_path)
33+
self.__saved = sys.path.copy(), sys.meta_path.copy()
3334

3435
def restore(self) -> None:
3536
sys.path[:], sys.meta_path[:] = self.__saved
@@ -40,7 +41,7 @@ class SysModulesSnapshot:
4041

4142
def __init__(self, preserve: Callable[[str], bool] | None = None) -> None:
4243
self.__preserve = preserve
43-
self.__saved = dict(sys.modules)
44+
self.__saved = sys.modules.copy()
4445

4546
def restore(self) -> None:
4647
if self.__preserve:

tests/test_latex_dependency_scanner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ def task_compile_document():
4141
assert session.exit_code == ExitCode.OK
4242
assert len(session.tasks) == 1
4343
if infer_dependencies == "true":
44-
assert len(session.tasks[0].depends_on) == 3
44+
assert len(session.tasks[0].depends_on) == 3 # noqa: PLR2004
4545
else:
46-
assert len(session.tasks[0].depends_on) == 2
46+
assert len(session.tasks[0].depends_on) == 2 # noqa: PLR2004

tests/test_parallel.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Contains test which ensure that the plugin works with pytask-parallel."""
2+
23
from __future__ import annotations
34

45
import os

0 commit comments

Comments
 (0)