Skip to content

Commit 8c3fdae

Browse files
[pre-commit.ci] pre-commit autoupdate (#38)
1 parent 1c09b7d commit 8c3fdae

File tree

7 files changed

+28
-51
lines changed

7 files changed

+28
-51
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,16 @@ repos:
2626
rev: v2.2.0
2727
hooks:
2828
- id: setup-cfg-fmt
29-
- repo: https://github.com/PyCQA/docformatter
30-
rev: v1.5.1
31-
hooks:
32-
- id: docformatter
33-
args: [--in-place, --wrap-summaries, "88", --wrap-descriptions, "88", --blank]
3429
- repo: https://github.com/psf/black
35-
rev: 22.12.0
30+
rev: 23.3.0
3631
hooks:
3732
- id: black
3833
- repo: https://github.com/charliermarsh/ruff-pre-commit
39-
rev: v0.0.223
34+
rev: v0.0.261
4035
hooks:
4136
- id: ruff
4237
- repo: https://github.com/dosisod/refurb
43-
rev: v1.10.0
38+
rev: v1.15.0
4439
hooks:
4540
- id: refurb
4641
args: [--ignore, FURB126]
@@ -59,11 +54,11 @@ repos:
5954
]
6055
args: [--wrap, "88"]
6156
- repo: https://github.com/codespell-project/codespell
62-
rev: v2.2.2
57+
rev: v2.2.4
6358
hooks:
6459
- id: codespell
6560
- repo: https://github.com/pre-commit/mirrors-mypy
66-
rev: 'v0.991'
61+
rev: 'v1.2.0'
6762
hooks:
6863
- id: mypy
6964
args: [

pyproject.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ target-version = "py37"
2929
select = ["ALL"]
3030
fix = true
3131
extend-ignore = [
32+
"TCH",
33+
"TRY",
3234
# Numpy docstyle
3335
"D107",
3436
"D203",
@@ -61,3 +63,15 @@ extend-ignore = [
6163

6264
[tool.ruff.pydocstyle]
6365
convention = "numpy"
66+
67+
68+
[tool.pytest.ini_options]
69+
# Do not add src since it messes with the loading of pytask-parallel as a plugin.
70+
testpaths = ["test"]
71+
markers = [
72+
"wip: Tests that are work-in-progress.",
73+
"unit: Flag for unit tests which target mainly a single function.",
74+
"integration: Flag for integration tests which may comprise of multiple unit tests.",
75+
"end_to_end: Flag for tests that cover the whole program.",
76+
]
77+
norecursedirs = [".idea", ".tox"]

src/pytask_r/parametrize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
@hookimpl
1111
def pytask_parametrize_kwarg_to_marker(obj: Any, kwargs: dict[Any, Any]) -> None:
1212
"""Attach parametrized r arguments to the function with a marker."""
13-
if callable(obj) and "r" in kwargs: # noqa: PLR2004
13+
if callable(obj) and "r" in kwargs:
1414
pytask.mark.r(**kwargs.pop("r"))(obj)

tests/test_collect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def test_r(args, kwargs, expectation, expected):
9797
),
9898
],
9999
)
100-
def test_parse_r_mark(
100+
def test_parse_r_mark( # noqa: PLR0913
101101
mark,
102102
default_options,
103103
default_serializer,

tests/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
def test_marker_is_configured(tmp_path):
99
session = main({"paths": tmp_path})
1010

11-
assert "r" in session.config["markers"] # noqa: PLR2004
11+
assert "r" in session.config["markers"]

tests/test_execute.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_pytask_execute_task_setup(monkeypatch):
3636
@pytest.mark.end_to_end()
3737
@parametrize_parse_code_serializer_suffix
3838
@pytest.mark.parametrize("depends_on", ["'in_1.txt'", "['in_1.txt', 'in_2.txt']"])
39-
def test_run_r_script(
39+
def test_run_r_script( # noqa: PLR0913
4040
runner, tmp_path, parse_config_code, serializer, suffix, depends_on
4141
):
4242
task_source = f"""
@@ -256,4 +256,4 @@ def task_run_r_script():
256256
result = runner.invoke(cli, [tmp_path.as_posix()])
257257

258258
assert result.exit_code == ExitCode.COLLECTION_FAILED
259-
assert "has multiple @pytask.mark.r marks" in result.output # noqa: PLR2004
259+
assert "has multiple @pytask.mark.r marks" in result.output

tox.ini

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[tox]
22
envlist = pytest
3-
skipsdist = True
4-
skip_missing_interpreters = True
5-
whitelist_externals = python
63

74
[testenv]
8-
basepython = python
5+
usedevelop = true
96

107
[testenv:pytest]
8+
conda_channels =
9+
conda-forge
10+
nodefaults
1111
conda_deps =
1212
pytask >=0.3
1313
pytask-parallel >=0.3
@@ -22,37 +22,5 @@ conda_deps =
2222
pytest
2323
pytest-cov
2424
pytest-xdist
25-
conda_channels =
26-
conda-forge
27-
nodefaults
2825
commands =
29-
pip install --no-deps -e .
3026
pytest {posargs}
31-
32-
[flake8]
33-
docstring-convention = numpy
34-
ignore =
35-
D
36-
E203 ; ignores whitespace around : which is enforced by Black.
37-
W503 ; ignores linebreak before binary operator which is enforced by Black.
38-
PT006 ; ignores that parametrizing tests with tuple argument names is preferred.
39-
PT023 ; ignores parentheses for marks.
40-
max-line-length = 88
41-
warn-symbols =
42-
pytest.mark.wip = Remove 'wip' flag for tests.
43-
pytest.mark.skip = Remove 'skip' flag for tests.
44-
45-
[pytest]
46-
addopts = --doctest-modules
47-
filterwarnings =
48-
ignore: the imp module is deprecated in favour of importlib
49-
ignore: The (parser|symbol) module is deprecated and will be removed in future
50-
ignore: Using or importing the ABCs from 'collections' instead of from
51-
markers =
52-
wip: Tests that are work-in-progress.
53-
unit: Flag for unit tests which target mainly a single function.
54-
integration: Flag for integration tests which may comprise of multiple unit tests.
55-
end_to_end: Flag for tests that cover the whole program.
56-
norecursedirs =
57-
.idea
58-
.tox

0 commit comments

Comments
 (0)