Skip to content

Commit a7480d5

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 972af03 commit a7480d5

9 files changed

+25
-24
lines changed

.github/ISSUE_TEMPLATE/enhancement.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ______________________________________________________________________
88
#### Is your feature request related to a problem?
99

1010
Provide a description of what the problem is, e.g. "I wish I could use pytask-r to do
11-
\[...\]".
11+
[...]".
1212

1313
#### Describe the solution you'd like
1414

src/pytask_r/serialization.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from pytask import PTask
1212
from pytask import PTaskWithPath
1313

14-
__all__ = ["create_path_to_serialized", "serialize_keyword_arguments", "SERIALIZERS"]
14+
__all__ = ["SERIALIZERS", "create_path_to_serialized", "serialize_keyword_arguments"]
1515

1616
_HIDDEN_FOLDER = ".pytask/pytask-r"
1717

tests/conftest.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
parametrize_parse_code_serializer_suffix = pytest.mark.parametrize(
18-
"parse_config_code, serializer, suffix",
18+
("parse_config_code", "serializer", "suffix"),
1919
[
2020
(
2121
"library(jsonlite); args <- commandArgs(trailingOnly=TRUE); "
@@ -92,6 +92,6 @@ def invoke(self, *args, **kwargs):
9292
return super().invoke(*args, **kwargs)
9393

9494

95-
@pytest.fixture()
95+
@pytest.fixture
9696
def runner():
9797
return CustomCliRunner()

tests/test_collect.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44

55
import pytest
66
from pytask import Mark
7+
78
from pytask_r.collect import _parse_r_mark
89
from pytask_r.collect import r
910
from pytask_r.serialization import SERIALIZERS
1011

1112

12-
@pytest.mark.unit()
13+
@pytest.mark.unit
1314
@pytest.mark.parametrize(
1415
("args", "kwargs", "expectation", "expected"),
1516
[
@@ -43,7 +44,7 @@ def test_r(args, kwargs, expectation, expected):
4344
assert result == expected
4445

4546

46-
@pytest.mark.unit()
47+
@pytest.mark.unit
4748
@pytest.mark.parametrize(
4849
(
4950
"mark",

tests/test_config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from pytask import build
55

66

7-
@pytest.mark.end_to_end()
7+
@pytest.mark.end_to_end
88
def test_marker_is_configured(tmp_path):
99
session = build(paths=tmp_path)
1010
assert "r" in session.config["markers"]

tests/test_execute.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
from pytask import Task
1010
from pytask import build
1111
from pytask import cli
12-
from pytask_r.execute import pytask_execute_task_setup
1312

13+
from pytask_r.execute import pytask_execute_task_setup
1414
from tests.conftest import needs_rscript
1515
from tests.conftest import parametrize_parse_code_serializer_suffix
1616

1717

18-
@pytest.mark.unit()
18+
@pytest.mark.unit
1919
def test_pytask_execute_task_setup(monkeypatch):
2020
"""Make sure that the task setup raises errors."""
2121
# Act like r is installed since we do not test this.
@@ -33,7 +33,7 @@ def test_pytask_execute_task_setup(monkeypatch):
3333

3434

3535
@needs_rscript
36-
@pytest.mark.end_to_end()
36+
@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']"])
3939
def test_run_r_script( # noqa: PLR0913
@@ -70,7 +70,7 @@ def task_run_r_script(produces = Path("out.txt")): ...
7070

7171

7272
@needs_rscript
73-
@pytest.mark.end_to_end()
73+
@pytest.mark.end_to_end
7474
@parametrize_parse_code_serializer_suffix
7575
def test_run_r_script_w_task_decorator(
7676
runner, tmp_path, parse_config_code, serializer, suffix
@@ -100,7 +100,7 @@ def run_r_script(): ...
100100

101101

102102
@needs_rscript
103-
@pytest.mark.end_to_end()
103+
@pytest.mark.end_to_end
104104
@parametrize_parse_code_serializer_suffix
105105
def test_raise_error_if_rscript_is_not_found(
106106
tmp_path, monkeypatch, parse_config_code, serializer, suffix
@@ -132,7 +132,7 @@ def task_run_r_script(): ...
132132

133133

134134
@needs_rscript
135-
@pytest.mark.end_to_end()
135+
@pytest.mark.end_to_end
136136
@parametrize_parse_code_serializer_suffix
137137
def test_run_r_script_w_saving_workspace(
138138
runner, tmp_path, parse_config_code, serializer, suffix
@@ -167,7 +167,7 @@ def task_run_r_script(): ...
167167

168168

169169
@needs_rscript
170-
@pytest.mark.end_to_end()
170+
@pytest.mark.end_to_end
171171
@parametrize_parse_code_serializer_suffix
172172
def test_run_r_script_w_wrong_cmd_option(
173173
runner, tmp_path, parse_config_code, serializer, suffix
@@ -202,7 +202,7 @@ def task_run_r_script(): ...
202202

203203

204204
@needs_rscript
205-
@pytest.mark.end_to_end()
205+
@pytest.mark.end_to_end
206206
def test_run_r_script_w_custom_serializer(runner, tmp_path):
207207
task_source = """
208208
import pytask
@@ -232,7 +232,7 @@ def task_run_r_script(): ...
232232

233233

234234
@needs_rscript
235-
@pytest.mark.end_to_end()
235+
@pytest.mark.end_to_end
236236
def test_run_r_script_fails_w_multiple_markers(runner, tmp_path):
237237
task_source = """
238238
import pytask
@@ -252,7 +252,7 @@ def task_run_r_script(): ...
252252

253253

254254
@needs_rscript
255-
@pytest.mark.end_to_end()
255+
@pytest.mark.end_to_end
256256
def test_run_r_script_with_capital_extension(runner, tmp_path):
257257
task_source = """
258258
import pytask
@@ -280,7 +280,7 @@ def task_run_r_script(): ...
280280

281281

282282
@needs_rscript
283-
@pytest.mark.end_to_end()
283+
@pytest.mark.end_to_end
284284
@parametrize_parse_code_serializer_suffix
285285
def test_run_r_script_w_nested_inputs(
286286
runner, tmp_path, parse_config_code, serializer, suffix

tests/test_normal_execution_w_plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from pytask import cli
1010

1111

12-
@pytest.mark.end_to_end()
12+
@pytest.mark.end_to_end
1313
@pytest.mark.parametrize(
1414
"dependencies",
1515
[(), ("in.txt",), ("in_1.txt", "in_2.txt")],

tests/test_parallel.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
@needs_rscript
28-
@pytest.mark.end_to_end()
28+
@pytest.mark.end_to_end
2929
@parametrize_parse_code_serializer_suffix
3030
def test_parallel_parametrization_over_source_files_w_loop(
3131
runner, tmp_path, parse_config_code, serializer, suffix
@@ -69,7 +69,7 @@ def task_execute_r_script():
6969

7070

7171
@needs_rscript
72-
@pytest.mark.end_to_end()
72+
@pytest.mark.end_to_end
7373
@parametrize_parse_code_serializer_suffix
7474
def test_parallel_parametrization_over_source_file_w_loop(
7575
runner, tmp_path, parse_config_code, serializer, suffix
@@ -106,7 +106,7 @@ def execute_r_script():
106106

107107

108108
@needs_rscript
109-
@pytest.mark.end_to_end()
109+
@pytest.mark.end_to_end
110110
@parametrize_parse_code_serializer_suffix
111111
@pytest.mark.xfail(reason="@task does not support partialed functions.")
112112
def test_parallel_parametrization_over_source_file_w_loop_and_lambda(

tests/test_parametrize.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
@needs_rscript
14-
@pytest.mark.end_to_end()
14+
@pytest.mark.end_to_end
1515
@parametrize_parse_code_serializer_suffix
1616
def test_parametrized_execution_of_r_script_w_loop(
1717
runner, tmp_path, parse_config_code, serializer, suffix
@@ -53,7 +53,7 @@ def task_run_r_script():
5353

5454

5555
@needs_rscript
56-
@pytest.mark.end_to_end()
56+
@pytest.mark.end_to_end
5757
@parametrize_parse_code_serializer_suffix
5858
def test_parametrize_r_options_and_product_paths_w_loop(
5959
runner, tmp_path, parse_config_code, serializer, suffix

0 commit comments

Comments
 (0)