| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 39975d5 commit 4a8d82b
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -334,7 +334,7 @@ def main() -> None: | |||
| 334 | 334 | # This first parsing step is used to find the gitlab config to use, and | |
| 335 | 335 | # load the propermodule (v3 or v4) accordingly. At that point we don't have | |
| 336 | 336 | # any subparser setup | |
| 337 | - (options, _) = parser.parse_known_args(sys.argv) | ||
| 337 | + options, _ = parser.parse_known_args(sys.argv) | ||
| 338 | 338 | try: | |
| 339 | 339 | config = gitlab.config.GitlabConfigParser(options.gitlab, options.config_file) | |
| 340 | 340 | except gitlab.config.ConfigError as e: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,14 +7,12 @@ | |||
| 7 | 7 | ||
| 8 | 8 | import pytest | |
| 9 | 9 | ||
| 10 | - content = textwrap.dedent( | ||
| 11 | - """\ | ||
| 10 | + content = textwrap.dedent("""\ | ||
| 12 | 11 | test-artifact: | |
| 13 | 12 | script: echo "test" > artifact.txt | |
| 14 | 13 | artifacts: | |
| 15 | 14 | untracked: true | |
| 16 | - """ | ||
| 17 | - ) | ||
| 15 | + """) | ||
| 18 | 16 | data = { | |
| 19 | 17 | "file_path": ".gitlab-ci.yml", | |
| 20 | 18 | "branch": "main", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -268,28 +268,22 @@ def test_ssl_verify_as_str(m_open, monkeypatch): | |||
| 268 | 268 | def test_data_from_helper(m_open, monkeypatch, tmp_path): | |
| 269 | 269 | helper = tmp_path / "helper.sh" | |
| 270 | 270 | helper.write_text( | |
| 271 | - dedent( | ||
| 272 | - """\ | ||
| 271 | + dedent("""\ | ||
| 273 | 272 | #!/bin/sh | |
| 274 | 273 | echo "secret" | |
| 275 | - """ | ||
| 276 | - ), | ||
| 274 | + """), | ||
| 277 | 275 | encoding="utf-8", | |
| 278 | 276 | ) | |
| 279 | 277 | helper.chmod(0o755) | |
| 280 | 278 | ||
| 281 | - fd = io.StringIO( | ||
| 282 | - dedent( | ||
| 283 | - f"""\ | ||
| 279 | + fd = io.StringIO(dedent(f"""\ | ||
| 284 | 280 | [global] | |
| 285 | 281 | default = helper | |
| 286 | 282 | ||
| 287 | 283 | [helper] | |
| 288 | 284 | url = https://helper.url | |
| 289 | 285 | oauth_token = helper: {helper} | |
| 290 | - """ | ||
| 291 | - ) | ||
| 292 | - ) | ||
| 286 | + """)) | ||
| 293 | 287 | ||
| 294 | 288 | fd.close = mock.Mock(return_value=None) | |
| 295 | 289 | m_open.return_value = fd | |
@@ -306,18 +300,14 @@ def test_data_from_helper(m_open, monkeypatch, tmp_path): | |||
| 306 | 300 | @pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows") | |
| 307 | 301 | def test_from_helper_subprocess_error_raises_error(m_open, monkeypatch): | |
| 308 | 302 | # using false here to force a non-zero return code | |
| 309 | - fd = io.StringIO( | ||
| 310 | - dedent( | ||
| 311 | - """\ | ||
| 303 | + fd = io.StringIO(dedent("""\ | ||
| 312 | 304 | [global] | |
| 313 | 305 | default = helper | |
| 314 | 306 | ||
| 315 | 307 | [helper] | |
| 316 | 308 | url = https://helper.url | |
| 317 | 309 | oauth_token = helper: false | |
| 318 | - """ | ||
| 319 | - ) | ||
| 320 | - ) | ||
| 310 | + """)) | ||
| 321 | 311 | ||
| 322 | 312 | fd.close = mock.Mock(return_value=None) | |
| 323 | 313 | m_open.return_value = fd | |
| Back | FazBrowse Home | New Git URL |
0 commit comments