Skip to content

Commit 90cac91

Browse files
[pre-commit.ci] pre-commit autoupdate (#57)
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 59ee150 commit 90cac91

File tree

5 files changed

+23
-22
lines changed

5 files changed

+23
-22
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
fail-fast: false
2828
matrix:
2929
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
30-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
30+
python-version: ['3.8', '3.9', '3.10', '3.11']
3131

3232
steps:
3333
- uses: actions/checkout@v4

.pre-commit-config.yaml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@ repos:
2525
- id: python-no-log-warn
2626
- id: python-use-type-annotations
2727
- id: text-unicode-replacement-char
28-
- repo: https://github.com/asottile/reorder_python_imports
29-
rev: v3.9.0
28+
- repo: https://github.com/asottile/reorder-python-imports
29+
rev: v3.11.0
3030
hooks:
3131
- id: reorder-python-imports
3232
args: [--py37-plus, --add-import, 'from __future__ import annotations']
3333
- repo: https://github.com/asottile/setup-cfg-fmt
34-
rev: v2.2.0
34+
rev: v2.4.0
3535
hooks:
3636
- id: setup-cfg-fmt
3737
- repo: https://github.com/psf/black
38-
rev: 23.3.0
38+
rev: 23.9.1
3939
hooks:
4040
- id: black
41-
- repo: https://github.com/charliermarsh/ruff-pre-commit
42-
rev: v0.0.261
41+
- repo: https://github.com/astral-sh/ruff-pre-commit
42+
rev: v0.0.291
4343
hooks:
4444
- id: ruff
4545
- repo: https://github.com/dosisod/refurb
46-
rev: v1.15.0
46+
rev: v1.21.0
4747
hooks:
4848
- id: refurb
4949
args: [--ignore, FURB126]
@@ -53,7 +53,7 @@ repos:
5353
- id: interrogate
5454
args: [-v, --fail-under=40, src, tests]
5555
- repo: https://github.com/executablebooks/mdformat
56-
rev: 0.7.16
56+
rev: 0.7.17
5757
hooks:
5858
- id: mdformat
5959
additional_dependencies: [
@@ -62,12 +62,12 @@ repos:
6262
]
6363
args: [--wrap, "88"]
6464
- repo: https://github.com/codespell-project/codespell
65-
rev: v2.2.4
65+
rev: v2.2.5
6666
hooks:
6767
- id: codespell
6868
args: [-L als, -L falsy]
6969
- repo: https://github.com/pre-commit/mirrors-mypy
70-
rev: 'v1.2.0'
70+
rev: 'v1.5.1'
7171
hooks:
7272
- id: mypy
7373
args: [
@@ -77,6 +77,7 @@ repos:
7777
additional_dependencies: [
7878
attrs>=21.3.0,
7979
click,
80+
pytask,
8081
types-PyYAML,
8182
types-setuptools
8283
]

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ url = https://github.com/pytask-dev/pytask-latex
77
author = Tobias Raabe
88
author_email = [email protected]
99
license = MIT
10-
license_file = LICENSE
10+
license_files = LICENSE
1111
platforms = any
1212
classifiers =
1313
Development Status :: 4 - Beta
@@ -28,7 +28,7 @@ install_requires =
2828
latex-dependency-scanner>=0.1.1
2929
pybaum>=0.1.1
3030
pytask>=0.3
31-
python_requires = >=3.7
31+
python_requires = >=3.8
3232
include_package_data = True
3333
package_dir = =src
3434
zip_safe = False

src/pytask_latex/collect.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ def compile_latex_document(
6565
Replaces the placeholder function provided by the user.
6666
6767
"""
68-
for step in compilation_steps:
69-
try:
68+
try:
69+
for step in compilation_steps:
7070
step(path_to_tex=path_to_tex, path_to_document=path_to_document)
71-
except CalledProcessError as e:
72-
raise RuntimeError(f"Compilation step {step.__name__} failed.") from e
71+
except CalledProcessError as e:
72+
raise RuntimeError(f"Compilation step {step.__name__} failed.") from e
7373

7474

7575
@hookimpl
@@ -182,7 +182,9 @@ def _add_latex_dependencies_retroactively(task: Task, session: Session) -> Task:
182182
183183
"""
184184
# Scan the LaTeX document for included files.
185-
latex_dependencies = set(lds.scan(task.depends_on["__script"].path))
185+
latex_dependencies = set(
186+
lds.scan(task.depends_on["__script"].path) # type: ignore[attr-defined]
187+
)
186188

187189
# Remove duplicated dependencies which have already been added by the user and those
188190
# which do not exist.

src/pytask_latex/compilation_steps.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ def run_latexmk(path_to_tex: Path, path_to_document: Path) -> None:
3434
out_dir_opt = [
3535
f"--output-directory={relative_to(path_to_tex, path_to_document.parent)}"
3636
]
37-
cmd = ["latexmk", *options, *job_name_opt, *out_dir_opt] + [
38-
path_to_tex.as_posix()
39-
]
40-
subprocess.run(cmd, check=True)
37+
cmd = ["latexmk", *options, *job_name_opt, *out_dir_opt, path_to_tex.as_posix()]
38+
subprocess.run(cmd, check=True) # noqa: S603
4139

4240
return run_latexmk

0 commit comments

Comments
 (0)