first save
This commit is contained in:
17
.venv/lib/python3.12/site-packages/_mpy_shed/pathlike.pyi
Normal file
17
.venv/lib/python3.12/site-packages/_mpy_shed/pathlike.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
pathlike is used in multiple stdlib stubs - but does not exists in MicroPython
|
||||
copied from typeshed/stdlib/os.pyi as os.pyi cannot import from a module with the same name
|
||||
"""
|
||||
|
||||
import abc
|
||||
from typing import Protocol, Tuple, runtime_checkable
|
||||
|
||||
from _typeshed import AnyStr_co
|
||||
|
||||
# mypy and pyright object to this being both ABC and Protocol.
|
||||
# At runtime it inherits from ABC and is not a Protocol, but it will be
|
||||
# on the allowlist for use as a Protocol starting in 3.14.
|
||||
@runtime_checkable
|
||||
class PathLike(ABC, Protocol[AnyStr_co]): # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues]
|
||||
@abc.abstractmethod
|
||||
def __fspath__(self) -> AnyStr_co: ...
|
||||
Reference in New Issue
Block a user