File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 1+ # ruff: noqa: I001, E402
12"""Define the public api for the snappylapy package."""
23import pytest
34pytest .register_assert_rewrite ("snappylapy.expectation_classes.base_snapshot" )
Original file line number Diff line number Diff line change @@ -36,13 +36,12 @@ def init() -> None:
3636 typer .echo (f"Added { constants .TEST_RESULTS_DIR_NAME } / to .gitignore." )
3737
3838
39-
4039@app .command ()
4140def clear () -> None :
4241 """Clear all test results and snapshots, recursively, using pathlib."""
4342 list_of_files_to_delete : list [pathlib .Path ] = []
4443 for dir_name in [constants .TEST_RESULTS_DIR_NAME , constants .SNAPSHOT_DIR_NAME ]:
45- for root_dir in pathlib .Path ("." ).rglob (dir_name ):
44+ for root_dir in pathlib .Path ().rglob (dir_name ):
4645 for file in root_dir .iterdir ():
4746 if file .is_file ():
4847 list_of_files_to_delete .append (file )
@@ -61,7 +60,7 @@ def clear() -> None:
6160 file .unlink ()
6261 # Delete directories
6362 for dir_name in [constants .TEST_RESULTS_DIR_NAME , constants .SNAPSHOT_DIR_NAME ]:
64- for root_dir in pathlib .Path ("." ).rglob (dir_name ):
63+ for root_dir in pathlib .Path ().rglob (dir_name ):
6564 root_dir .rmdir ()
6665 typer .echo (f"Deleted { len (list_of_files_to_delete )} files." )
6766
You can’t perform that action at this time.
0 commit comments