Skip to content

Commit 436bcaa

Browse files
committed
Add type: ignore in test that we can't set USE_SHELL on instances
As with other `type: ignore` comments in the deprecation tests, mypy will detect if it is superfluous (provided warn_unused_ignores is set to true), thereby enforcing that such code is a static type error.
1 parent e725c82 commit 436bcaa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/deprecation/test_cmd_git.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def test_use_shell_cannot_set_on_instance(
274274
) -> None:
275275
instance = Git()
276276
with pytest.raises(AttributeError):
277-
instance.USE_SHELL = value
277+
instance.USE_SHELL = value # type: ignore[misc] # Name not in __slots__.
278278

279279

280280
@pytest.mark.filterwarnings("ignore::DeprecationWarning")

0 commit comments

Comments
 (0)