mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
io.IOBase: correct metaclass (#8468)
`io.IOBase` has `ABCMeta` as the metaclass at runtime: 75a6441718/Lib/io.py (L71)
But not currently in the stub. This is causing an unexpected stubtest failure for a `urllib3` PR here: https://github.com/python/typeshed/runs/7633083101?check_suite_focus=true
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import abc
|
||||
import builtins
|
||||
import codecs
|
||||
import sys
|
||||
@@ -47,7 +48,7 @@ BlockingIOError = builtins.BlockingIOError
|
||||
|
||||
class UnsupportedOperation(OSError, ValueError): ...
|
||||
|
||||
class IOBase:
|
||||
class IOBase(metaclass=abc.ABCMeta):
|
||||
def __iter__(self) -> Iterator[bytes]: ...
|
||||
def __next__(self) -> bytes: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
|
||||
Reference in New Issue
Block a user