Skip to content

Commit 25eefd5

Browse files
committed
Reformat with black.
1 parent b1e06f7 commit 25eefd5

6 files changed

Lines changed: 19 additions & 6 deletions

File tree

relink.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
validate_paths,
2121
validate_directory,
2222
configure_logging,
23-
logger
23+
logger,
2424
)
2525

2626
# Define a custom log level that always prints

shared.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ def add_parser_verbosity_group(parser: argparse.ArgumentParser):
118118
"""
119119
verbosity_group = parser.add_mutually_exclusive_group()
120120
verbosity_group.add_argument(
121-
"-v", "--verbose", action="store_true", help="Enable verbose output (DEBUG level)"
121+
"-v",
122+
"--verbose",
123+
action="store_true",
124+
help="Enable verbose output (DEBUG level)",
122125
)
123126
verbosity_group.add_argument(
124127
"-q",

tests/rimport/test_build_parser.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,17 @@ def test_list_arguments_accepted(self, list_flag):
4747
assert args.filelist == "files.txt"
4848
assert args.file is None
4949

50-
@pytest.mark.parametrize("inputdata_flag", ["-inputdata", "-i", "--inputdata", "--inputdata-root", "-inputdata-root"])
50+
@pytest.mark.parametrize(
51+
"inputdata_flag",
52+
["-inputdata", "-i", "--inputdata", "--inputdata-root", "-inputdata-root"],
53+
)
5154
def test_inputdata_arguments_accepted(self, temp_dirs, inputdata_flag):
5255
"""Test that all inputdata argument flags are accepted."""
5356
inputdata_root, _ = temp_dirs
5457
parser = rimport.build_parser()
55-
args = parser.parse_args([inputdata_flag, inputdata_root, "-f", "dummy_file.nc"])
58+
args = parser.parse_args(
59+
[inputdata_flag, inputdata_root, "-f", "dummy_file.nc"]
60+
)
5661
assert args.inputdata_root == inputdata_root
5762

5863
def test_file_and_list_mutually_exclusive(self, capsys):

tests/rimport/test_can_file_be_downloaded.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
class TestCanFileBeDownloaded:
3333
"""Test suite for can_file_be_downloaded() function."""
3434

35-
@pytest.mark.skipif(not os.path.exists("/glade"), reason="This test can only run on Glade")
35+
@pytest.mark.skipif(
36+
not os.path.exists("/glade"), reason="This test can only run on Glade"
37+
)
3638
def test_existing_file_exists(self):
3739
"""Test that the file that should exist does. If not, other tests will definitely fail."""
3840
file_abspath = Path(os.path.join(DEFAULT_STAGING_ROOT, RELPATH_THAT_DOES_EXIST))

tests/shared/test_configure_logging.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def test_clears_existing_handlers(self):
7171
"""Test that configure_logging clears any existing handlers."""
7272
# Add a dummy handler
7373
from io import StringIO
74+
7475
dummy_handler = logging.StreamHandler(StringIO())
7576
logger.addHandler(dummy_handler)
7677
assert len(logger.handlers) >= 1

tests/shared/test_validate_paths.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
"""
22
Tests for shared.py validate_directory() and validate_paths() functions.
33
"""
4+
45
import os
56
import argparse
67

78
import pytest
89

910
import shared
1011

12+
1113
class TestValidateDirectory:
1214
"""Test suite for validate_directory function."""
1315

@@ -145,4 +147,4 @@ def test_list_with_file_instead_of_directory(self, tmp_path):
145147
file1 = tmp_path / "file.txt"
146148
file1.write_text("content")
147149

148-
shared.validate_paths([str(dir1), str(file1)])
150+
shared.validate_paths([str(dir1), str(file1)])

0 commit comments

Comments
 (0)