Skip to content

Commit 07490eb

Browse files
committed
test: fix mypy complaints on test_xpath.py
1 parent 4dd05a7 commit 07490eb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/runtime/test_xpath.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ def test_no_positional_arg(self) -> None:
347347
def test_two_positional_args(self) -> None:
348348
with pytest.raises(TypeError):
349349
# pyrefly: ignore[bad-argument-count]
350-
XPath("//a", "//b") # type: ignore[call-arg] # pyright: ignore[reportCallIssue]
350+
XPath("//a", cast(Any, "//b")) # type: ignore[misc] # pyright: ignore[reportCallIssue]
351351

352352
@settings(suppress_health_check=[HealthCheck.too_slow], max_examples=300)
353353
@given(thing=_st.all_instances_except_of_type(str, bytes, bytearray))
@@ -496,7 +496,7 @@ def test_no_positional_arg(self) -> None:
496496
def test_two_positional_args(self) -> None:
497497
with pytest.raises(TypeError):
498498
# pyrefly: ignore[bad-argument-count]
499-
ETXPath("//a", "//b") # type: ignore[call-arg] # pyright: ignore[reportCallIssue]
499+
ETXPath("//a", cast(Any, "//b")) # type: ignore[misc] # pyright: ignore[reportCallIssue]
500500

501501
@settings(suppress_health_check=[HealthCheck.too_slow], max_examples=300)
502502
@given(thing=_st.all_instances_except_of_type(str, bytes, bytearray))
@@ -562,7 +562,7 @@ def test_no_positional_arg(self) -> None:
562562
def test_two_positional_args(self, disposable_element: _Element) -> None:
563563
with pytest.raises(TypeError):
564564
# pyrefly: ignore[bad-argument-count]
565-
XPathElementEvaluator(disposable_element, disposable_element) # type: ignore[call-arg] # pyright: ignore[reportCallIssue]
565+
XPathElementEvaluator(disposable_element, cast(Any, disposable_element)) # type: ignore[misc] # pyright: ignore[reportCallIssue]
566566

567567
@settings(suppress_health_check=[HealthCheck.too_slow], max_examples=300)
568568
@given(thing=_st.all_instances_except_of_type(_Element))
@@ -660,7 +660,7 @@ def test_no_positional_arg(self) -> None:
660660
def test_two_positional_args(self, xml2_tree: _ElementTree) -> None:
661661
with pytest.raises(TypeError):
662662
# pyrefly: ignore[bad-argument-count]
663-
XPathDocumentEvaluator(xml2_tree, xml2_tree) # type: ignore[call-arg] # pyright: ignore[reportCallIssue]
663+
XPathDocumentEvaluator(xml2_tree, cast(Any, xml2_tree)) # type: ignore[misc] # pyright: ignore[reportCallIssue]
664664

665665
@settings(suppress_health_check=[HealthCheck.too_slow], max_examples=300)
666666
@given(thing=_st.all_instances_except_of_type(_ElementTree))

0 commit comments

Comments
 (0)