-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync typeshed #11905
Sync typeshed #11905
Conversation
Source commit: python/typeshed@9116b29
This comment has been minimized.
This comment has been minimized.
A lot of primer is from fixing the PathLike regression (although looks like it's getting clipped, so download the diffs from the job to see everything) |
This comment has been minimized.
This comment has been minimized.
This error is a little less friendly, but seems fine
|
I don't know that these have caught any real issues in the last couple years, however, the standard library ones have been a bit of a pain, most recently in python#11905. Jukka was okay removing the stdlib samples two years ago, see python#8838 (comment) We now have tooling like mypy primer that runs mypy over a much larger and more varied corpus of code on every PR. The other samples haven't caused me much bother, but except for crawl2, they're all very simple. I don't think they provide us much value, unless they have sentimental or historical value.
I propose removing stdlib samples altogether in #11906 |
The asyncio ones are interesting. |
This comment has been minimized.
This comment has been minimized.
Thanks for the ping: I've updated this test here
I've also partially covered this problem in #11693 |
As discussed in python#11895, mypy's test suite currently does not pass a mypy self-check when run on Windows. This should hopefully be fixed by python/typeshed#6812, but running a self-check on Windows as part of the CI tests should help avoid this issue in the future. This new CI test should hopefully fail until python#11905 is merged, confirming the diagnosis of the problem that I made in python#11895. Once python#11905 is merged, it should hopefully then pass, allowing this PR to be merged.
I don't know that these have caught any real issues in the last couple years, however, the standard library ones have been a bit of a pain, most recently in #11905. Jukka was okay removing the stdlib samples two years ago, see #8838 (comment) We now have tooling like mypy primer that runs mypy over a much larger and more varied corpus of code on every PR. The other samples haven't caused me much bother (except for crawl, which I removed in #9375), but except for crawl2, they're all very simple. I don't think they provide us much value, unless they have sentimental or historical value.
This comment has been minimized.
This comment has been minimized.
Okay, just got the |
@hauntsaninja I did it so it will match its definition in: https://github.com/python/cpython/blob/7357ac94f84ae768c39a6bccf1a3f5c4e8dc8c75/Lib/asyncio/tasks.py#L593 |
@sobolevn the typeshed change itself makes sense and I'm fine with. The part I'm missing is why mypy's type inference is worse with the new definition of In fact, I just found something really weird. So the test expects the following to reveal
But really weirdly, if you add another
|
No, it looks like a bug 😞 |
I don't know that these have caught any real issues in the last couple years, however, the standard library ones have been a bit of a pain, most recently in python#11905. Jukka was okay removing the stdlib samples two years ago, see python#8838 (comment) We now have tooling like mypy primer that runs mypy over a much larger and more varied corpus of code on every PR. The other samples haven't caused me much bother (except for crawl, which I removed in python#9375), but except for crawl2, they're all very simple. I don't think they provide us much value, unless they have sentimental or historical value.
Just marking that test as xfail for now, we can file an issue |
Diff from mypy_primer, showing the effect of this PR on open source code: rich (https://github.com/willmcgugan/rich)
+ rich/console.py:1818: error: Incompatible return value type (got "Tuple[str, Optional[int], Dict[str, Any]]", expected "Tuple[str, int, Dict[str, Any]]")
boostedblob (https://github.com/hauntsaninja/boostedblob)
- boostedblob/path.py:350: error: Argument 1 to "stat" has incompatible type "LocalPath"; expected "Union[int, Union[str, bytes, PathLike[str], PathLike[bytes]]]"
- boostedblob/path.py:457: error: Argument 1 to "isdir" has incompatible type "LocalPath"; expected "Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int]"
- boostedblob/path.py:481: error: Argument 1 to "isfile" has incompatible type "LocalPath"; expected "Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int]"
- boostedblob/path.py:505: error: Argument 1 to "exists" has incompatible type "LocalPath"; expected "Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int]"
- boostedblob/share.py:26: error: No overload variant of "abspath" matches argument type "LocalPath"
- boostedblob/share.py:26: note: Possible overload variants:
- boostedblob/share.py:26: note: def [AnyStr in (str, bytes)] abspath(path: PathLike[AnyStr]) -> AnyStr
- boostedblob/share.py:26: note: def [AnyStr in (str, bytes)] abspath(path: AnyStr) -> AnyStr
- boostedblob/read.py:93: error: No overload variant of "open" matches argument types "LocalPath", "str"
- boostedblob/read.py:93: note: Possible overload variants:
- boostedblob/read.py:93: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Union[Literal['r+'], Literal['+r'], Literal['rt+'], Literal['r+t'], Literal['+rt'], Literal['tr+'], Literal['t+r'], Literal['+tr'], Literal['w+'], Literal['+w'], Literal['wt+'], Literal['w+t'], Literal['+wt'], Literal['tw+'], Literal['t+w'], Literal['+tw'], Literal['a+'], Literal['+a'], Literal['at+'], Literal['a+t'], Literal['+at'], Literal['ta+'], Literal['t+a'], Literal['+ta'], Literal['x+'], Literal['+x'], Literal['xt+'], Literal['x+t'], Literal['+xt'], Literal['tx+'], Literal['t+x'], Literal['+tx']], Union[Literal['w'], Literal['wt'], Literal['tw'], Literal['a'], Literal['at'], Literal['ta'], Literal['x'], Literal['xt'], Literal['tx']], Union[Literal['r'], Literal['rt'], Literal['tr'], Literal['U'], Literal['rU'], Literal['Ur'], Literal['rtU'], Literal['rUt'], Literal['Urt'], Literal['trU'], Literal['tUr'], Literal['Utr']]] = ..., buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> TextIOWrapper
- boostedblob/read.py:93: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Union[Literal['rb+'], Literal['r+b'], Literal['+rb'], Literal['br+'], Literal['b+r'], Literal['+br'], Literal['wb+'], Literal['w+b'], Literal['+wb'], Literal['bw+'], Literal['b+w'], Literal['+bw'], Literal['ab+'], Literal['a+b'], Literal['+ab'], Literal['ba+'], Literal['b+a'], Literal['+ba'], Literal['xb+'], Literal['x+b'], Literal['+xb'], Literal['bx+'], Literal['b+x'], Literal['+bx']], Union[Literal['rb'], Literal['br'], Literal['rbU'], Literal['rUb'], Literal['Urb'], Literal['brU'], Literal['bUr'], Literal['Ubr']], Union[Literal['wb'], Literal['bw'], Literal['ab'], Literal['ba'], Literal['xb'], Literal['bx']]], buffering: Literal[0], encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> FileIO
- boostedblob/read.py:93: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Literal['rb+'], Literal['r+b'], Literal['+rb'], Literal['br+'], Literal['b+r'], Literal['+br'], Literal['wb+'], Literal['w+b'], Literal['+wb'], Literal['bw+'], Literal['b+w'], Literal['+bw'], Literal['ab+'], Literal['a+b'], Literal['+ab'], Literal['ba+'], Literal['b+a'], Literal['+ba'], Literal['xb+'], Literal['x+b'], Literal['+xb'], Literal['bx+'], Literal['b+x'], Literal['+bx']], buffering: Union[Literal[-1], Literal[1]] = ..., encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BufferedRandom
- boostedblob/read.py:93: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Literal['wb'], Literal['bw'], Literal['ab'], Literal['ba'], Literal['xb'], Literal['bx']], buffering: Union[Literal[-1], Literal[1]] = ..., encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BufferedWriter
- boostedblob/read.py:93: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Literal['rb'], Literal['br'], Literal['rbU'], Literal['rUb'], Literal['Urb'], Literal['brU'], Literal['bUr'], Literal['Ubr']], buffering: Union[Literal[-1], Literal[1]] = ..., encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BufferedReader
- boostedblob/read.py:93: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Union[Literal['rb+'], Literal['r+b'], Literal['+rb'], Literal['br+'], Literal['b+r'], Literal['+br'], Literal['wb+'], Literal['w+b'], Literal['+wb'], Literal['bw+'], Literal['b+w'], Literal['+bw'], Literal['ab+'], Literal['a+b'], Literal['+ab'], Literal['ba+'], Literal['b+a'], Literal['+ba'], Literal['xb+'], Literal['x+b'], Literal['+xb'], Literal['bx+'], Literal['b+x'], Literal['+bx']], Union[Literal['rb'], Literal['br'], Literal['rbU'], Literal['rUb'], Literal['Urb'], Literal['brU'], Literal['bUr'], Literal['Ubr']], Union[Literal['wb'], Literal['bw'], Literal['ab'], Literal['ba'], Literal['xb'], Literal['bx']]], buffering: int, encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BinaryIO
- boostedblob/read.py:93: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: str, buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> IO[Any]
- boostedblob/read.py:142: error: No overload variant of "open" matches argument types "LocalPath", "str"
- boostedblob/read.py:142: note: Possible overload variants:
- boostedblob/read.py:142: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Union[Literal['r+'], Literal['+r'], Literal['rt+'], Literal['r+t'], Literal['+rt'], Literal['tr+'], Literal['t+r'], Literal['+tr'], Literal['w+'], Literal['+w'], Literal['wt+'], Literal['w+t'], Literal['+wt'], Literal['tw+'], Literal['t+w'], Literal['+tw'], Literal['a+'], Literal['+a'], Literal['at+'], Literal['a+t'], Literal['+at'], Literal['ta+'], Literal['t+a'], Literal['+ta'], Literal['x+'], Literal['+x'], Literal['xt+'], Literal['x+t'], Literal['+xt'], Literal['tx+'], Literal['t+x'], Literal['+tx']], Union[Literal['w'], Literal['wt'], Literal['tw'], Literal['a'], Literal['at'], Literal['ta'], Literal['x'], Literal['xt'], Literal['tx']], Union[Literal['r'], Literal['rt'], Literal['tr'], Literal['U'], Literal['rU'], Literal['Ur'], Literal['rtU'], Literal['rUt'], Literal['Urt'], Literal['trU'], Literal['tUr'], Literal['Utr']]] = ..., buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> TextIOWrapper
- boostedblob/read.py:142: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Union[Literal['rb+'], Literal['r+b'], Literal['+rb'], Literal['br+'], Literal['b+r'], Literal['+br'], Literal['wb+'], Literal['w+b'], Literal['+wb'], Literal['bw+'], Literal['b+w'], Literal['+bw'], Literal['ab+'], Literal['a+b'], Literal['+ab'], Literal['ba+'], Literal['b+a'], Literal['+ba'], Literal['xb+'], Literal['x+b'], Literal['+xb'], Literal['bx+'], Literal['b+x'], Literal['+bx']], Union[Literal['rb'], Literal['br'], Literal['rbU'], Literal['rUb'], Literal['Urb'], Literal['brU'], Literal['bUr'], Literal['Ubr']], Union[Literal['wb'], Literal['bw'], Literal['ab'], Literal['ba'], Literal['xb'], Literal['bx']]], buffering: Literal[0], encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> FileIO
- boostedblob/read.py:142: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Literal['rb+'], Literal['r+b'], Literal['+rb'], Literal['br+'], Literal['b+r'], Literal['+br'], Literal['wb+'], Literal['w+b'], Literal['+wb'], Literal['bw+'], Literal['b+w'], Literal['+bw'], Literal['ab+'], Literal['a+b'], Literal['+ab'], Literal['ba+'], Literal['b+a'], Literal['+ba'], Literal['xb+'], Literal['x+b'], Literal['+xb'], Literal['bx+'], Literal['b+x'], Literal['+bx']], buffering: Union[Literal[-1], Literal[1]] = ..., encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BufferedRandom
- boostedblob/read.py:142: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Literal['wb'], Literal['bw'], Literal['ab'], Literal['ba'], Literal['xb'], Literal['bx']], buffering: Union[Literal[-1], Literal[1]] = ..., encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BufferedWriter
- boostedblob/read.py:142: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Literal['rb'], Literal['br'], Literal['rbU'], Literal['rUb'], Literal['Urb'], Literal['brU'], Literal['bUr'], Literal['Ubr']], buffering: Union[Literal[-1], Literal[1]] = ..., encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BufferedReader
- boostedblob/read.py:142: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Union[Literal['rb+'], Literal['r+b'], Literal['+rb'], Literal['br+'], Literal['b+r'], Literal['+br'], Literal['wb+'], Literal['w+b'], Literal['+wb'], Literal['bw+'], Literal['b+w'], Literal['+bw'], Literal['ab+'], Literal['a+b'], Literal['+ab'], Literal['ba+'], Literal['b+a'], Literal['+ba'], Literal['xb+'], Literal['x+b'], Literal['+xb'], Literal['bx+'], Literal['b+x'], Literal['+bx']], Union[Literal['rb'], Literal['br'], Literal['rbU'], Literal['rUb'], Literal['Urb'], Literal['brU'], Literal['bUr'], Literal['Ubr']], Union[Literal['wb'], Literal['bw'], Literal['ab'], Literal['ba'], Literal['xb'], Literal['bx']]], buffering: int, encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BinaryIO
- boostedblob/read.py:142: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: str, buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> IO[Any]
- boostedblob/listing.py:177: error: No overload variant of "abspath" matches argument type "LocalPath"
- boostedblob/listing.py:177: note: Possible overload variants:
- boostedblob/listing.py:177: note: def [AnyStr in (str, bytes)] abspath(path: PathLike[AnyStr]) -> AnyStr
- boostedblob/listing.py:177: note: def [AnyStr in (str, bytes)] abspath(path: AnyStr) -> AnyStr
- boostedblob/listing.py:213: error: No overload variant of "listdir" matches argument type "LocalPath"
- boostedblob/listing.py:213: note: Possible overload variants:
- boostedblob/listing.py:213: note: def listdir(path: Optional[str] = ...) -> List[str]
- boostedblob/listing.py:213: note: def listdir(path: bytes) -> List[bytes]
- boostedblob/listing.py:213: note: def listdir(path: int) -> List[str]
- boostedblob/listing.py:213: note: def listdir(path: PathLike[str]) -> List[str]
- boostedblob/listing.py:252: error: No overload variant of "abspath" matches argument type "LocalPath"
- boostedblob/listing.py:252: note: Possible overload variants:
- boostedblob/listing.py:252: note: def [AnyStr in (str, bytes)] abspath(path: PathLike[AnyStr]) -> AnyStr
- boostedblob/listing.py:252: note: def [AnyStr in (str, bytes)] abspath(path: AnyStr) -> AnyStr
- boostedblob/listing.py:295: error: Value of type variable "AnyStr" of "walk" cannot be "LocalPath"
- boostedblob/listing.py:297: error: Argument 1 to "LocalPath" has incompatible type "LocalPath"; expected "str"
- boostedblob/listing.py:297: error: Unsupported operand types for / ("LocalPath" and "LocalPath")
- boostedblob/listing.py:375: error: No overload variant of "dirname" matches argument type "LocalPath"
- boostedblob/listing.py:375: note: Possible overload variants:
- boostedblob/listing.py:375: note: def [AnyStr in (str, bytes)] dirname(p: PathLike[AnyStr]) -> AnyStr
- boostedblob/listing.py:375: note: def [AnyStr in (str, bytes)] dirname(p: AnyStr) -> AnyStr
- boostedblob/delete.py:68: error: Argument 1 to "remove" has incompatible type "LocalPath"; expected "Union[str, bytes, PathLike[str], PathLike[bytes]]"
- boostedblob/delete.py:68: note: "LocalPath" is missing following "PathLike" protocol member:
- boostedblob/delete.py:68: note: __class_getitem__
- boostedblob/delete.py:68: note: Following member(s) of "LocalPath" have conflicts:
- boostedblob/delete.py:68: note: Expected:
- boostedblob/delete.py:68: note: def __fspath__(self) -> bytes
- boostedblob/delete.py:68: note: Got:
- boostedblob/delete.py:68: note: def __fspath__(self) -> str
- boostedblob/delete.py:152: error: Argument 1 to "rmtree" has incompatible type "LocalPath"; expected "Union[bytes, Union[str, PathLike[str]]]"
- boostedblob/write.py:87: error: Argument 1 to "makedirs" has incompatible type "LocalPath"; expected "Union[str, bytes, PathLike[str], PathLike[bytes]]"
- boostedblob/write.py:87: note: "LocalPath" is missing following "PathLike" protocol member:
- boostedblob/write.py:87: note: __class_getitem__
- boostedblob/write.py:87: note: Following member(s) of "LocalPath" have conflicts:
- boostedblob/write.py:87: note: Expected:
- boostedblob/write.py:87: note: def __fspath__(self) -> bytes
- boostedblob/write.py:87: note: Got:
- boostedblob/write.py:87: note: def __fspath__(self) -> str
- boostedblob/write.py:88: error: No overload variant of "open" matches argument types "LocalPath", "str"
- boostedblob/write.py:88: note: Possible overload variants:
- boostedblob/write.py:88: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Union[Literal['r+'], Literal['+r'], Literal['rt+'], Literal['r+t'], Literal['+rt'], Literal['tr+'], Literal['t+r'], Literal['+tr'], Literal['w+'], Literal['+w'], Literal['wt+'], Literal['w+t'], Literal['+wt'], Literal['tw+'], Literal['t+w'], Literal['+tw'], Literal['a+'], Literal['+a'], Literal['at+'], Literal['a+t'], Literal['+at'], Literal['ta+'], Literal['t+a'], Literal['+ta'], Literal['x+'], Literal['+x'], Literal['xt+'], Literal['x+t'], Literal['+xt'], Literal['tx+'], Literal['t+x'], Literal['+tx']], Union[Literal['w'], Literal['wt'], Literal['tw'], Literal['a'], Literal['at'], Literal['ta'], Literal['x'], Literal['xt'], Literal['tx']], Union[Literal['r'], Literal['rt'], Literal['tr'], Literal['U'], Literal['rU'], Literal['Ur'], Literal['rtU'], Literal['rUt'], Literal['Urt'], Literal['trU'], Literal['tUr'], Literal['Utr']]] = ..., buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> TextIOWrapper
- boostedblob/write.py:88: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Union[Literal['rb+'], Literal['r+b'], Literal['+rb'], Literal['br+'], Literal['b+r'], Literal['+br'], Literal['wb+'], Literal['w+b'], Literal['+wb'], Literal['bw+'], Literal['b+w'], Literal['+bw'], Literal['ab+'], Literal['a+b'], Literal['+ab'], Literal['ba+'], Literal['b+a'], Literal['+ba'], Literal['xb+'], Literal['x+b'], Literal['+xb'], Literal['bx+'], Literal['b+x'], Literal['+bx']], Union[Literal['rb'], Literal['br'], Literal['rbU'], Literal['rUb'], Literal['Urb'], Literal['brU'], Literal['bUr'], Literal['Ubr']], Union[Literal['wb'], Literal['bw'], Literal['ab'], Literal['ba'], Literal['xb'], Literal['bx']]], buffering: Literal[0], encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> FileIO
- boostedblob/write.py:88: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Literal['rb+'], Literal['r+b'], Literal['+rb'], Literal['br+'], Literal['b+r'], Literal['+br'], Literal['wb+'], Literal['w+b'], Literal['+wb'], Literal['bw+'], Literal['b+w'], Literal['+bw'], Literal['ab+'], Literal['a+b'], Literal['+ab'], Literal['ba+'], Literal['b+a'], Literal['+ba'], Literal['xb+'], Literal['x+b'], Literal['+xb'], Literal['bx+'], Literal['b+x'], Literal['+bx']], buffering: Union[Literal[-1], Literal[1]] = ..., encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BufferedRandom
- boostedblob/write.py:88: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Literal['wb'], Literal['bw'], Literal['ab'], Literal['ba'], Literal['xb'], Literal['bx']], buffering: Union[Literal[-1], Literal[1]] = ..., encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BufferedWriter
- boostedblob/write.py:88: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Literal['rb'], Literal['br'], Literal['rbU'], Literal['rUb'], Literal['Urb'], Literal['brU'], Literal['bUr'], Literal['Ubr']], buffering: Union[Literal[-1], Literal[1]] = ..., encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BufferedReader
- boostedblob/write.py:88: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Union[Literal['rb+'], Literal['r+b'], Literal['+rb'], Literal['br+'], Literal['b+r'], Literal['+br'], Literal['wb+'], Literal['w+b'], Literal['+wb'], Literal['bw+'], Literal['b+w'], Literal['+bw'], Literal['ab+'], Literal['a+b'], Literal['+ab'], Literal['ba+'], Literal['b+a'], Literal['+ba'], Literal['xb+'], Literal['x+b'], Literal['+xb'], Literal['bx+'], Literal['b+x'], Literal['+bx']], Union[Literal['rb'], Literal['br'], Literal['rbU'], Literal['rUb'], Literal['Urb'], Literal['brU'], Literal['bUr'], Literal['Ubr']], Union[Literal['wb'], Literal['bw'], Literal['ab'], Literal['ba'], Literal['xb'], Literal['bx']]], buffering: int, encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BinaryIO
- boostedblob/write.py:88: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: str, buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> IO[Any]
- boostedblob/write.py:223: error: Argument 1 to "makedirs" has incompatible type "LocalPath"; expected "Union[str, bytes, PathLike[str], PathLike[bytes]]"
- boostedblob/write.py:223: note: "LocalPath" is missing following "PathLike" protocol member:
- boostedblob/write.py:223: note: __class_getitem__
- boostedblob/write.py:223: note: Following member(s) of "LocalPath" have conflicts:
- boostedblob/write.py:223: note: Expected:
- boostedblob/write.py:223: note: def __fspath__(self) -> bytes
- boostedblob/write.py:223: note: Got:
- boostedblob/write.py:223: note: def __fspath__(self) -> str
- boostedblob/write.py:224: error: No overload variant of "open" matches argument types "LocalPath", "str"
- boostedblob/write.py:224: note: Possible overload variants:
- boostedblob/write.py:224: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Union[Literal['r+'], Literal['+r'], Literal['rt+'], Literal['r+t'], Literal['+rt'], Literal['tr+'], Literal['t+r'], Literal['+tr'], Literal['w+'], Literal['+w'], Literal['wt+'], Literal['w+t'], Literal['+wt'], Literal['tw+'], Literal['t+w'], Literal['+tw'], Literal['a+'], Literal['+a'], Literal['at+'], Literal['a+t'], Literal['+at'], Literal['ta+'], Literal['t+a'], Literal['+ta'], Literal['x+'], Literal['+x'], Literal['xt+'], Literal['x+t'], Literal['+xt'], Literal['tx+'], Literal['t+x'], Literal['+tx']], Union[Literal['w'], Literal['wt'], Literal['tw'], Literal['a'], Literal['at'], Literal['ta'], Literal['x'], Literal['xt'], Literal['tx']], Union[Literal['r'], Literal['rt'], Literal['tr'], Literal['U'], Literal['rU'], Literal['Ur'], Literal['rtU'], Literal['rUt'], Literal['Urt'], Literal['trU'], Literal['tUr'], Literal['Utr']]] = ..., buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> TextIOWrapper
- boostedblob/write.py:224: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Union[Literal['rb+'], Literal['r+b'], Literal['+rb'], Literal['br+'], Literal['b+r'], Literal['+br'], Literal['wb+'], Literal['w+b'], Literal['+wb'], Literal['bw+'], Literal['b+w'], Literal['+bw'], Literal['ab+'], Literal['a+b'], Literal['+ab'], Literal['ba+'], Literal['b+a'], Literal['+ba'], Literal['xb+'], Literal['x+b'], Literal['+xb'], Literal['bx+'], Literal['b+x'], Literal['+bx']], Union[Literal['rb'], Literal['br'], Literal['rbU'], Literal['rUb'], Literal['Urb'], Literal['brU'], Literal['bUr'], Literal['Ubr']], Union[Literal['wb'], Literal['bw'], Literal['ab'], Literal['ba'], Literal['xb'], Literal['bx']]], buffering: Literal[0], encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> FileIO
- boostedblob/write.py:224: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Literal['rb+'], Literal['r+b'], Literal['+rb'], Literal['br+'], Literal['b+r'], Literal['+br'], Literal['wb+'], Literal['w+b'], Literal['+wb'], Literal['bw+'], Literal['b+w'], Literal['+bw'], Literal['ab+'], Literal['a+b'], Literal['+ab'], Literal['ba+'], Literal['b+a'], Literal['+ba'], Literal['xb+'], Literal['x+b'], Literal['+xb'], Literal['bx+'], Literal['b+x'], Literal['+bx']], buffering: Union[Literal[-1], Literal[1]] = ..., encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BufferedRandom
- boostedblob/write.py:224: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Literal['wb'], Literal['bw'], Literal['ab'], Literal['ba'], Literal['xb'], Literal['bx']], buffering: Union[Literal[-1], Literal[1]] = ..., encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BufferedWriter
- boostedblob/write.py:224: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Literal['rb'], Literal['br'], Literal['rbU'], Literal['rUb'], Literal['Urb'], Literal['brU'], Literal['bUr'], Literal['Ubr']], buffering: Union[Literal[-1], Literal[1]] = ..., encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BufferedReader
- boostedblob/write.py:224: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Union[Literal['rb+'], Literal['r+b'], Literal['+rb'], Literal['br+'], Literal['b+r'], Literal['+br'], Literal['wb+'], Literal['w+b'], Literal['+wb'], Literal['bw+'], Literal['b+w'], Literal['+bw'], Literal['ab+'], Literal['a+b'], Literal['+ab'], Literal['ba+'], Literal['b+a'], Literal['+ba'], Literal['xb+'], Literal['x+b'], Literal['+xb'], Literal['bx+'], Literal['b+x'], Literal['+bx']], Union[Literal['rb'], Literal['br'], Literal['rbU'], Literal['rUb'], Literal['Urb'], Literal['brU'], Literal['bUr'], Literal['Ubr']], Union[Literal['wb'], Literal['bw'], Literal['ab'], Literal['ba'], Literal['xb'], Literal['bx']]], buffering: int, encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BinaryIO
- boostedblob/write.py:224: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: str, buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> IO[Any]
- boostedblob/copying.py:110: error: Argument 1 to "makedirs" has incompatible type "LocalPath"; expected "Union[str, bytes, PathLike[str], PathLike[bytes]]"
- boostedblob/copying.py:110: note: "LocalPath" is missing following "PathLike" protocol member:
- boostedblob/copying.py:110: note: __class_getitem__
- boostedblob/copying.py:110: note: Following member(s) of "LocalPath" have conflicts:
- boostedblob/copying.py:110: note: Expected:
- boostedblob/copying.py:110: note: def __fspath__(self) -> bytes
- boostedblob/copying.py:110: note: Got:
- boostedblob/copying.py:110: note: def __fspath__(self) -> str
- boostedblob/copying.py:111: error: Value of type variable "_PathT" of "copyfile" cannot be "LocalPath"
- boostedblob/copying.py:111: error: Argument 1 to "copyfile" has incompatible type "LocalPath"; expected "Union[str, PathLike[str]]"
- boostedblob/copying.py:111: note: "LocalPath" is missing following "PathLike" protocol member:
- boostedblob/copying.py:111: note: __class_getitem__
- boostedblob/cli.py:294: error: No overload variant of "open" matches argument types "LocalPath", "str"
- boostedblob/cli.py:294: note: Possible overload variants:
- boostedblob/cli.py:294: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Union[Literal['r+'], Literal['+r'], Literal['rt+'], Literal['r+t'], Literal['+rt'], Literal['tr+'], Literal['t+r'], Literal['+tr'], Literal['w+'], Literal['+w'], Literal['wt+'], Literal['w+t'], Literal['+wt'], Literal['tw+'], Literal['t+w'], Literal['+tw'], Literal['a+'], Literal['+a'], Literal['at+'], Literal['a+t'], Literal['+at'], Literal['ta+'], Literal['t+a'], Literal['+ta'], Literal['x+'], Literal['+x'], Literal['xt+'], Literal['x+t'], Literal['+xt'], Literal['tx+'], Literal['t+x'], Literal['+tx']], Union[Literal['w'], Literal['wt'], Literal['tw'], Literal['a'], Literal['at'], Literal['ta'], Literal['x'], Literal['xt'], Literal['tx']], Union[Literal['r'], Literal['rt'], Literal['tr'], Literal['U'], Literal['rU'], Literal['Ur'], Literal['rtU'], Literal['rUt'], Literal['Urt'], Literal['trU'], Literal['tUr'], Literal['Utr']]] = ..., buffering: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> TextIOWrapper
- boostedblob/cli.py:294: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Union[Literal['rb+'], Literal['r+b'], Literal['+rb'], Literal['br+'], Literal['b+r'], Literal['+br'], Literal['wb+'], Literal['w+b'], Literal['+wb'], Literal['bw+'], Literal['b+w'], Literal['+bw'], Literal['ab+'], Literal['a+b'], Literal['+ab'], Literal['ba+'], Literal['b+a'], Literal['+ba'], Literal['xb+'], Literal['x+b'], Literal['+xb'], Literal['bx+'], Literal['b+x'], Literal['+bx']], Union[Literal['rb'], Literal['br'], Literal['rbU'], Literal['rUb'], Literal['Urb'], Literal['brU'], Literal['bUr'], Literal['Ubr']], Union[Literal['wb'], Literal['bw'], Literal['ab'], Literal['ba'], Literal['xb'], Literal['bx']]], buffering: Literal[0], encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> FileIO
- boostedblob/cli.py:294: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Literal['rb+'], Literal['r+b'], Literal['+rb'], Literal['br+'], Literal['b+r'], Literal['+br'], Literal['wb+'], Literal['w+b'], Literal['+wb'], Literal['bw+'], Literal['b+w'], Literal['+bw'], Literal['ab+'], Literal['a+b'], Literal['+ab'], Literal['ba+'], Literal['b+a'], Literal['+ba'], Literal['xb+'], Literal['x+b'], Literal['+xb'], Literal['bx+'], Literal['b+x'], Literal['+bx']], buffering: Union[Literal[-1], Literal[1]] = ..., encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BufferedRandom
- boostedblob/cli.py:294: note: def open(file: Union[Union[str, bytes, PathLike[str], PathLike[bytes]], int], mode: Union[Literal['wb'], Literal['bw'], Literal['ab'], Literal['ba'], Literal['xb'], Literal['bx']], buffering: Union[Literal[-1], Literal[1]] = ..., encoding: None = ..., errors: None = ..., newline: None = ..., closefd: bool = ..., opener: Optional[Callable[[str, int], int]] = ...) -> BufferedWriter
- b``` |
Filed an issue for the regression in #12089 |
Source commit:
python/typeshed@9116b29