@@ -781,7 +781,11 @@ async def test_add_project_with_project_root_sanitizes_paths(
781781 # (project_name, user_path, expected_sanitized_name)
782782 # User path is IGNORED - only project name matters
783783 ("test" , "anything/path" , "test" ),
784- ("Test BiSync" , "~/Documents/Test BiSync" , "test-bi-sync" ), # BiSync -> bi-sync (dash preserved)
784+ (
785+ "Test BiSync" ,
786+ "~/Documents/Test BiSync" ,
787+ "test-bi-sync" ,
788+ ), # BiSync -> bi-sync (dash preserved)
785789 ("My Project" , "/tmp/whatever" , "my-project" ),
786790 ("UPPERCASE" , "~" , "uppercase" ),
787791 ("With Spaces" , "~/Documents/With Spaces" , "with-spaces" ),
@@ -801,12 +805,8 @@ async def test_add_project_with_project_root_sanitizes_paths(
801805
802806 # The path should be under project_root (resolve both to handle macOS /private/var)
803807 assert (
804- Path (actual_path )
805- .resolve ()
806- .is_relative_to (Path (project_root_path ).resolve ())
807- ), (
808- f"Path { actual_path } should be under { project_root_path } "
809- )
808+ Path (actual_path ).resolve ().is_relative_to (Path (project_root_path ).resolve ())
809+ ), f"Path { actual_path } should be under { project_root_path } "
810810
811811 # Verify the final path segment is the sanitized project name
812812 path_parts = Path (actual_path ).parts
@@ -910,7 +910,9 @@ async def test_add_project_without_project_root_allows_arbitrary_paths(
910910 await project_service .remove_project (test_project_name )
911911
912912
913- @pytest .mark .skip (reason = "Obsolete: project_root mode now uses sanitized project name, not user path. See test_add_project_with_project_root_sanitizes_paths instead." )
913+ @pytest .mark .skip (
914+ reason = "Obsolete: project_root mode now uses sanitized project name, not user path. See test_add_project_with_project_root_sanitizes_paths instead."
915+ )
914916@pytest .mark .skipif (os .name == "nt" , reason = "Project root constraints only tested on POSIX systems" )
915917@pytest .mark .asyncio
916918async def test_add_project_with_project_root_normalizes_case (
@@ -962,7 +964,9 @@ async def test_add_project_with_project_root_normalizes_case(
962964 pytest .fail (f"Unexpected ValueError for input path { input_path } : { e } " )
963965
964966
965- @pytest .mark .skip (reason = "Obsolete: project_root mode now uses sanitized project name, not user path." )
967+ @pytest .mark .skip (
968+ reason = "Obsolete: project_root mode now uses sanitized project name, not user path."
969+ )
966970@pytest .mark .skipif (os .name == "nt" , reason = "Project root constraints only tested on POSIX systems" )
967971@pytest .mark .asyncio
968972async def test_add_project_with_project_root_detects_case_collisions (
@@ -1173,7 +1177,9 @@ async def test_add_project_nested_validation_with_project_root(
11731177 # NOT the user-provided path "parent-folder"
11741178 assert parent_project_name .lower () in parent_actual_path .lower ()
11751179 # Resolve both to handle macOS /private/var vs /var
1176- assert Path (parent_actual_path ).resolve ().is_relative_to (Path (project_root_path ).resolve ())
1180+ assert (
1181+ Path (parent_actual_path ).resolve ().is_relative_to (Path (project_root_path ).resolve ())
1182+ )
11771183
11781184 # Nested projects should still be prevented, even with user path ignored
11791185 # Since paths use project names, this won't actually be nested
0 commit comments