File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ def _looks_like_parents_subscript(node: nodes.Subscript) -> bool:
2828 value = next (node .value .infer ())
2929 except (InferenceError , StopIteration ):
3030 return False
31- parents = "pathlib._abc._PathParents " if PY313_PLUS else "pathlib._PathParents"
31+ parents = "builtins.tuple " if PY313_PLUS else "pathlib._PathParents"
3232 return (
3333 isinstance (value , bases .Instance )
3434 and isinstance (value ._proxied , nodes .ClassDef )
Original file line number Diff line number Diff line change @@ -43,7 +43,10 @@ def test_inference_parents_subscript_index() -> None:
4343 inferred = path .inferred ()
4444 assert len (inferred ) == 1
4545 assert isinstance (inferred [0 ], bases .Instance )
46- assert inferred [0 ].qname () == "pathlib.Path"
46+ if PY313_PLUS :
47+ assert inferred [0 ].qname () == "pathlib._local.Path"
48+ else :
49+ assert inferred [0 ].qname () == "pathlib.Path"
4750
4851
4952def test_inference_parents_subscript_slice () -> None :
You can’t perform that action at this time.
0 commit comments