X Tutup
Skip to content

Commit 4a8d82b

Browse files
chore(black): run black v26 on code
black changed how some code was formatted in v26
1 parent 39975d5 commit 4a8d82b

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

gitlab/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def main() -> None:
334334
# This first parsing step is used to find the gitlab config to use, and
335335
# load the propermodule (v3 or v4) accordingly. At that point we don't have
336336
# any subparser setup
337-
(options, _) = parser.parse_known_args(sys.argv)
337+
options, _ = parser.parse_known_args(sys.argv)
338338
try:
339339
config = gitlab.config.GitlabConfigParser(options.gitlab, options.config_file)
340340
except gitlab.config.ConfigError as e:

tests/functional/cli/test_cli_artifacts.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@
77

88
import pytest
99

10-
content = textwrap.dedent(
11-
"""\
10+
content = textwrap.dedent("""\
1211
test-artifact:
1312
script: echo "test" > artifact.txt
1413
artifacts:
1514
untracked: true
16-
"""
17-
)
15+
""")
1816
data = {
1917
"file_path": ".gitlab-ci.yml",
2018
"branch": "main",

tests/unit/test_config.py

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -268,28 +268,22 @@ def test_ssl_verify_as_str(m_open, monkeypatch):
268268
def test_data_from_helper(m_open, monkeypatch, tmp_path):
269269
helper = tmp_path / "helper.sh"
270270
helper.write_text(
271-
dedent(
272-
"""\
271+
dedent("""\
273272
#!/bin/sh
274273
echo "secret"
275-
"""
276-
),
274+
"""),
277275
encoding="utf-8",
278276
)
279277
helper.chmod(0o755)
280278

281-
fd = io.StringIO(
282-
dedent(
283-
f"""\
279+
fd = io.StringIO(dedent(f"""\
284280
[global]
285281
default = helper
286282
287283
[helper]
288284
url = https://helper.url
289285
oauth_token = helper: {helper}
290-
"""
291-
)
292-
)
286+
"""))
293287

294288
fd.close = mock.Mock(return_value=None)
295289
m_open.return_value = fd
@@ -306,18 +300,14 @@ def test_data_from_helper(m_open, monkeypatch, tmp_path):
306300
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows")
307301
def test_from_helper_subprocess_error_raises_error(m_open, monkeypatch):
308302
# using false here to force a non-zero return code
309-
fd = io.StringIO(
310-
dedent(
311-
"""\
303+
fd = io.StringIO(dedent("""\
312304
[global]
313305
default = helper
314306
315307
[helper]
316308
url = https://helper.url
317309
oauth_token = helper: false
318-
"""
319-
)
320-
)
310+
"""))
321311

322312
fd.close = mock.Mock(return_value=None)
323313
m_open.return_value = fd

0 commit comments

Comments
 (0)
X Tutup