@@ -46,7 +46,7 @@ def test_is_uvx_in_chain_with_uvx_exe(self):
4646 def test_is_uvx_in_chain_with_uv_exe_only (self ):
4747 """Test _is_uvx_in_chain does NOT detect uv.exe alone (only uvx.exe)."""
4848 from code_puppy .uvx_detection import _is_uvx_in_chain
49-
49+
5050 # uv.exe alone should NOT trigger detection - only uvx.exe has SIGINT issues
5151 chain = ["python.exe" , "uv.exe" , "powershell.exe" ]
5252 assert _is_uvx_in_chain (chain ) is False
@@ -84,6 +84,7 @@ def test_should_use_alternate_cancel_key_windows_uvx(self):
8484
8585 # Re-import with mocks active
8686 import importlib
87+
8788 import code_puppy .uvx_detection
8889
8990 importlib .reload (code_puppy .uvx_detection )
@@ -101,6 +102,7 @@ def test_should_use_alternate_cancel_key_windows_uvx(self):
101102 def test_should_use_alternate_cancel_key_windows_no_uvx (self ):
102103 """Test should_use_alternate_cancel_key returns False on Windows without uvx."""
103104 import importlib
105+
104106 import code_puppy .uvx_detection
105107
106108 importlib .reload (code_puppy .uvx_detection )
@@ -116,6 +118,7 @@ def test_should_use_alternate_cancel_key_windows_no_uvx(self):
116118 def test_should_use_alternate_cancel_key_linux_uvx (self ):
117119 """Test should_use_alternate_cancel_key returns False on Linux even with uvx."""
118120 import importlib
121+
119122 import code_puppy .uvx_detection
120123
121124 importlib .reload (code_puppy .uvx_detection )
@@ -131,6 +134,7 @@ def test_should_use_alternate_cancel_key_linux_uvx(self):
131134 def test_should_use_alternate_cancel_key_macos_uvx (self ):
132135 """Test should_use_alternate_cancel_key returns False on macOS even with uvx."""
133136 import importlib
137+
134138 import code_puppy .uvx_detection
135139
136140 importlib .reload (code_puppy .uvx_detection )
@@ -180,6 +184,7 @@ def test_get_parent_process_chain_psutil_available(self):
180184 # This test runs with actual psutil if installed
181185 try :
182186 import psutil # noqa: F401
187+
183188 from code_puppy .uvx_detection import _get_parent_process_chain_psutil
184189
185190 chain = _get_parent_process_chain_psutil ()
@@ -241,6 +246,7 @@ def test_keymap_returns_ctrl_k_on_windows_uvx(self):
241246 ):
242247 # Import fresh to pick up the mock
243248 import importlib
249+
244250 import code_puppy .keymap
245251
246252 importlib .reload (code_puppy .keymap )
@@ -258,6 +264,7 @@ def test_keymap_respects_config_when_not_uvx(self):
258264 patch ("code_puppy.config.get_value" , return_value = "ctrl+q" ),
259265 ):
260266 import importlib
267+
261268 import code_puppy .keymap
262269
263270 importlib .reload (code_puppy .keymap )
@@ -275,6 +282,7 @@ def test_keymap_returns_default_when_not_uvx_and_no_config(self):
275282 patch ("code_puppy.config.get_value" , return_value = None ),
276283 ):
277284 import importlib
285+
278286 import code_puppy .keymap
279287
280288 importlib .reload (code_puppy .keymap )
@@ -289,6 +297,7 @@ class TestMockedProcessChain:
289297 def test_uvx_detection_with_mocked_chain (self ):
290298 """Test uvx detection with a simulated uvx process chain."""
291299 import importlib
300+
292301 import code_puppy .uvx_detection
293302
294303 importlib .reload (code_puppy .uvx_detection )
@@ -309,6 +318,7 @@ def test_uvx_detection_with_mocked_chain(self):
309318 def test_no_uvx_detection_with_mocked_chain (self ):
310319 """Test no uvx detection with a non-uvx process chain."""
311320 import importlib
321+
312322 import code_puppy .uvx_detection
313323
314324 importlib .reload (code_puppy .uvx_detection )
@@ -329,6 +339,7 @@ def test_no_uvx_detection_with_mocked_chain(self):
329339 def test_uvx_detection_caching (self ):
330340 """Test that uvx detection result is cached."""
331341 import importlib
342+
332343 import code_puppy .uvx_detection
333344
334345 importlib .reload (code_puppy .uvx_detection )
@@ -354,4 +365,4 @@ def counting_get_chain():
354365 assert result1 is True
355366 assert result2 is True
356367 # Should only call the chain function once due to caching
357- assert call_count == 1
368+ assert call_count == 1
0 commit comments