Skip to content

Commit e3a48a2

Browse files
committed
Lint
1 parent 41af5a1 commit e3a48a2

File tree

3 files changed

+20
-15
lines changed

3 files changed

+20
-15
lines changed

tests/test_config.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,34 +98,39 @@
9898
pytest.param("[snippet_fmt]\ndirectives = ['jupyter-execute']", id="directives_c_underscore"),
9999
pytest.param("[snippet_fmt]\ndirectives = ['code-cell']", id="directives_d_underscore"),
100100
pytest.param(
101-
"[snippet_fmt]\ndirectives = ['code-cell', 'sourcecode']", id="directives_e_underscore"
101+
"[snippet_fmt]\ndirectives = ['code-cell', 'sourcecode']",
102+
id="directives_e_underscore",
102103
),
103104
pytest.param(TABLE_LANGUAGES_A, id="languages_a"),
104105
pytest.param("[tool.snippet-fmt]", id="pyproject_empty_table"),
105106
pytest.param("[tool.snippet-fmt]\ndirectives = ['code-block']", id="pyproject_directives_a"),
106107
pytest.param("[tool.snippet-fmt]\ndirectives = ['code']", id="pyproject_directives_b"),
107108
pytest.param("[tool.snippet-fmt]\ndirectives = ['jupyter-execute']", id="pyproject_directives_c"),
108109
pytest.param("[tool.snippet-fmt]\ndirectives = ['code-cell']", id="pyproject_directives_d"),
109-
pytest.
110-
param("[tool.snippet-fmt]\ndirectives = ['code-cell', 'sourcecode']", id="pyproject_directives_e"),
110+
pytest.param(
111+
"[tool.snippet-fmt]\ndirectives = ['code-cell', 'sourcecode']",
112+
id="pyproject_directives_e",
113+
),
111114
pytest.param("[tool.snippet-fmt]", id="pyproject_underscore_empty_table"),
112115
pytest.param(
113-
"[tool.snippet_fmt]\ndirectives = ['code-block']", id="pyproject_underscore_directives_a"
116+
"[tool.snippet_fmt]\ndirectives = ['code-block']",
117+
id="pyproject_underscore_directives_a",
114118
),
115119
pytest.param("[tool.snippet_fmt]\ndirectives = ['code']", id="pyproject_underscore_directives_b"),
116120
pytest.param(
117121
"[tool.snippet_fmt]\ndirectives = ['jupyter-execute']",
118-
id="pyproject_underscore_directives_c"
122+
id="pyproject_underscore_directives_c",
119123
),
120124
pytest.param(
121-
"[tool.snippet_fmt]\ndirectives = ['code-cell']", id="pyproject_underscore_directives_d"
125+
"[tool.snippet_fmt]\ndirectives = ['code-cell']",
126+
id="pyproject_underscore_directives_d",
122127
),
123128
pytest.param(
124129
"[tool.snippet_fmt]\ndirectives = ['code-cell', 'sourcecode']",
125-
id="pyproject_underscore_directives_e"
130+
id="pyproject_underscore_directives_e",
126131
),
127132
pytest.param(PYPROJECT_LANGUAGES_A, id="pyproject_languages_a"),
128-
]
133+
],
129134
)
130135
def test_load_toml(
131136
config: str,

tests/test_formatters.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
pytest.param("[project]\nname = 'foo'", id="TOML"),
1515
pytest.param("[project]\nname: foo", id="INI"),
1616
pytest.param('{"project": {"name": "foo"}}', id="JSON"),
17-
]
17+
],
1818
)
1919
def test_noformat(code: str):
2020
assert noformat(code) == code
@@ -59,7 +59,7 @@ def test_reformat_python(
5959
('["hello", "world"]', '["hello", "world"]'),
6060
(' [ "hello" , \n\n\n"world" ]\n\n\n\n', '["hello", "world"]'),
6161
('{"hello": "world"}', '{"hello": "world"}'),
62-
]
62+
],
6363
)
6464
def test_format_json(code: str, expected: str):
6565
assert format_json(code) == code
@@ -73,7 +73,7 @@ def test_format_json(code: str, expected: str):
7373
('["hello", "world"]', '[\n "hello",\n "world"\n]'),
7474
(' [ "hello" , \n\n\n"world" ]\n\n\n\n', '[\n "hello",\n "world"\n]'),
7575
('{"hello": "world"}', '{\n "hello": "world"\n}'),
76-
]
76+
],
7777
)
7878
def test_format_json_options(code: str, expected: str):
7979
assert format_json(code, indent=2) == code
@@ -86,7 +86,7 @@ def test_format_json_options(code: str, expected: str):
8686
[
8787
('[project]\nhello = "world"', '[project]\nhello = "world"\n'),
8888
(' [project]\n\n \thello = "world"', '[project]\nhello = "world"\n'),
89-
]
89+
],
9090
)
9191
def test_format_toml(code: str, expected: str):
9292
assert format_toml(code) == code
@@ -99,7 +99,7 @@ def test_format_toml(code: str, expected: str):
9999
[
100100
('[project]\nhello: world', '[project]\nhello = world\n\n'),
101101
(' [project]\n\n \thello = world', '[project]\nhello = world\n\n'),
102-
]
102+
],
103103
)
104104
def test_format_ini(code: str, expected: str):
105105
assert format_ini(code) == code

tests/test_snippet_fmt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
pytest.param(["code-block", "code", "code-cell"], id='5'),
3030
pytest.param(["code-block", "code", "code-cell", "sourcecode"], id='6'),
3131
pytest.param(["code-block", "code", "parsed-literal"], id='7'),
32-
]
32+
],
3333
)
3434
languages = pytest.mark.parametrize(
3535
"languages",
@@ -81,7 +81,7 @@
8181
id="json_indent_new_error_msg",
8282
marks=min_version("3.13"),
8383
),
84-
]
84+
],
8585
)
8686
filenames = pytest.mark.parametrize("filename", [param("example.rst", idx=0)])
8787

0 commit comments

Comments
 (0)