Skip to content

Conversation

@christianbundy
Copy link
Contributor

Description

Problem: I fixed strtobool inn the stdlib typeshed and would love for mypy to know about the change.

Solution: Sync typeshed.

See-also: python/typeshed#6970

Source commit:
python/typeshed@3a22bf2

Test Plan

N/A

@christianbundy
Copy link
Contributor Author

🤔

I wasn't expecting Tuple to be rewritten as tuple. Did I do it wrong? I just ran misc/sync-typeshed.py.

@JelleZijlstra
Copy link
Member

Thanks! There's also a typeshed sync open at #11905 with some unresolved issues. I think we should resolve those before doing another sync.

@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

bidict (https://github.com/jab/bidict)
+ bidict/_mut.py:147: error: Signature of "update" incompatible with supertype "MutableMapping"  [override]
+ bidict/_mut.py:147: note:      Superclass:
+ bidict/_mut.py:147: note:          @overload
+ bidict/_mut.py:147: note:          def update(self, SupportsKeysAndGetItem[KT, VT], **kwargs: VT) -> None
+ bidict/_mut.py:147: note:          @overload
+ bidict/_mut.py:147: note:          def update(self, Iterable[Tuple[KT, VT]], **kwargs: VT) -> None
+ bidict/_mut.py:147: note:          @overload
+ bidict/_mut.py:147: note:          def update(self, **kwargs: VT) -> None
+ bidict/_mut.py:147: note:      Subclass:
+ bidict/_mut.py:147: note:          @overload
+ bidict/_mut.py:147: note:          def update(self, Mapping[KT, VT], **kw: VT) -> None
+ bidict/_mut.py:147: note:          @overload
+ bidict/_mut.py:147: note:          def update(self, Iterable[Tuple[KT, VT]], **kw: VT) -> None
+ bidict/_mut.py:147: note:          @overload
+ bidict/_mut.py:147: note:          def update(self, **kw: VT) -> None

mypy_primer (https://github.com/hauntsaninja/mypy_primer)
+ mypy_primer.py:557: error: Argument 1 to "iter" has incompatible type "List[Project]"; expected "_SupportsIter[Generator[Project, None, None]]"

ignite (https://github.com/pytorch/ignite)
+ ignite/engine/events.py:141: error: Unused "type: ignore" comment

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[C```

@christianbundy
Copy link
Contributor Author

Sounds good, thanks! I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants