File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1613,6 +1613,7 @@ def test_fallback_dir_returned_when_preferred_dir_not_writable(self) -> None:
16131613 # Assert
16141614 assert result == fallback
16151615 mock_warn .assert_called_once ()
1616+ warn_kwargs = {}
16161617 args , kwargs = mock_warn .call_args
16171618 if kwargs :
16181619 warn_kwargs : dict = kwargs
@@ -1842,9 +1843,13 @@ def test_simple_gui_warning_contains_jump_hint(self) -> None:
18421843
18431844 # Assert
18441845 mock_warn .assert_called_once ()
1846+
1847+ # 1. Initialize 'body' here so Pylint knows it exists
1848+ body = ""
1849+
18451850 args , kwargs = mock_warn .call_args
18461851 if "body" in kwargs :
1847- body : str = kwargs ["body" ]
1852+ body = kwargs ["body" ] # Removed the ': str' type hint to keep it clean
18481853 elif len (args ) > 1 :
18491854 body = args [1 ]
18501855 else :
You can’t perform that action at this time.
0 commit comments