PurePosixPath subclass causing Mismatch between signature.. since 1.1.373 #8525
Replies: 1 comment
-
I presume that you have manually enabled the The purpose of this check is to report situations where the According to the typeshed stubs, the class if sys.version_info >= (3, 12):
def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...
else:
def __new__(cls, *args: StrPath) -> Self: ... Since you're using Python 3.12, pyright will use the first of these two If you want your |
Beta Was this translation helpful? Give feedback.
-
1.1.354
was happy with code below (and works at run time), but I just bumped to1.1.373
and I'm getting:Offending code:
I know there's been awkwardness around
pathlib
subclassing in the past, but I'm on Python 3.12.1 and I figured it had all been cleaned up. Any ideas? 🤔Beta Was this translation helpful? Give feedback.
All reactions