Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 25, 2024
1 parent 6293441 commit 04898db
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions tests/streaming_cli_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_dandiset_streaming_cli(tmpdir: py.path.local):
expected_console_output = io.readlines()

# Different platforms maybe have different indices for start and end of test reports
report_start = test_console_output.index(f"0 CRITICAL\n")
report_start = test_console_output.index("0 CRITICAL\n")
expected_report_length = 38
report_end = report_start + expected_report_length
assert test_console_output[report_start:report_end] == expected_console_output[14:]
Expand All @@ -52,7 +52,7 @@ def test_dandiset_streaming_cli_with_version(tmpdir: py.path.local):
expected_console_output = io.readlines()

# Different platforms maybe have different indices for start and end of test reports
report_start = test_console_output.index(f"0 CRITICAL\n")
report_start = test_console_output.index("0 CRITICAL\n")
expected_report_length = 38
report_end = report_start + expected_report_length
assert test_console_output[report_start:report_end] == expected_console_output[14:]
Expand Down Expand Up @@ -82,7 +82,7 @@ def test_dandiset_streaming_cli_saved_report(tmpdir: py.path.local):
expected_report = io.readlines()

# Different platforms maybe have different indices for start and end of test reports
report_start = test_report.index(f"0 CRITICAL\n")
report_start = test_report.index("0 CRITICAL\n")
expected_report_length = 38
report_end = report_start + expected_report_length
assert test_report[report_start:report_end] == expected_report[14:]
Expand Down Expand Up @@ -115,7 +115,7 @@ def test_dandiset_streaming_cli_with_version_saved_report(tmpdir: py.path.local)
expected_report = io.readlines()

# Different platforms maybe have different indices for start and end of test reports
report_start = test_report.index(f"0 CRITICAL\n")
report_start = test_report.index("0 CRITICAL\n")
expected_report_length = 38
report_end = report_start + expected_report_length
assert test_report[report_start:report_end] == expected_report[14:]
2 changes: 1 addition & 1 deletion tests/test_inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def setUpClass(cls):
add_non_matching_timestamps_dimension(nwbfiles[3])

cls.nwbfile_paths = [str(cls.tempdir / f"testing{j}.nwb") for j in range(num_nwbfiles)]
cls.nwbfile_paths[3] = str(cls.tempdir / f"._testing3.nwb")
cls.nwbfile_paths[3] = str(cls.tempdir / "._testing3.nwb")
for nwbfile_path, nwbfile in zip(cls.nwbfile_paths, nwbfiles):
with NWBHDF5IO(path=nwbfile_path, mode="w") as io:
io.write(nwbfile)
Expand Down
4 changes: 2 additions & 2 deletions tests/unit_tests/test_behavior.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def test_trigger_check_compass_direction_unit():
)

assert (
check_compass_direction_unit(obj)[0].message == f"SpatialSeries objects inside a CompassDirection object "
f"should be angular and should have a unit of 'degrees' or 'radians', but 'SpatialSeries' has units 'meters'."
check_compass_direction_unit(obj)[0].message == "SpatialSeries objects inside a CompassDirection object "
"should be angular and should have a unit of 'degrees' or 'radians', but 'SpatialSeries' has units 'meters'."
)


Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/test_image_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
@unittest.skipIf(
TESTING_FILES_FOLDER_PATH is None,
reason=(
f"These ImageSeries unit tests were skipped because the environment variable "
"These ImageSeries unit tests were skipped because the environment variable "
"'TESTING_FILES_FOLDER_PATH' was not set!"
),
)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/test_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_check_order_of_images_len():
images = Images(name="my_images", images=imgs, order_of_images=img_refs)

assert check_order_of_images_len(images) == InspectorMessage(
message=f"Length of order_of_images (6) does not match the number of images (5).",
message="Length of order_of_images (6) does not match the number of images (5).",
importance=Importance.BEST_PRACTICE_VIOLATION,
check_function_name="check_order_of_images_len",
object_type="Images",
Expand Down
4 changes: 2 additions & 2 deletions tests/unit_tests/test_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def test_table_time_columns_are_not_negative_fail():

assert check_table_time_columns_are_not_negative(test_table) == [
InspectorMessage(
message=f"Timestamps in column test_time should not be negative."
message="Timestamps in column test_time should not be negative."
" It is recommended to align the `session_start_time` or `timestamps_reference_time` to be the earliest time value that occurs in the data, and shift all other signals accordingly.",
importance=Importance.BEST_PRACTICE_SUGGESTION,
check_function_name="check_table_time_columns_are_not_negative",
Expand All @@ -451,7 +451,7 @@ def test_table_time_columns_are_not_negative_fail():
location="/",
),
InspectorMessage(
message=f"Timestamps in column start_time should not be negative."
message="Timestamps in column start_time should not be negative."
" It is recommended to align the `session_start_time` or `timestamps_reference_time` to be the earliest time value that occurs in the data, and shift all other signals accordingly.",
importance=Importance.BEST_PRACTICE_SUGGESTION,
check_function_name="check_table_time_columns_are_not_negative",
Expand Down

0 comments on commit 04898db

Please sign in to comment.