mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-20 02:41:16 +08:00
csv, ctypes, configparser explanations (#5204)
This commit is contained in:
@@ -45,7 +45,9 @@ class Interpolation:
|
||||
|
||||
class BasicInterpolation(Interpolation): ...
|
||||
class ExtendedInterpolation(Interpolation): ...
|
||||
class LegacyInterpolation(Interpolation): ...
|
||||
|
||||
class LegacyInterpolation(Interpolation):
|
||||
def before_get(self, parser: _parser, section: str, option: str, value: str, vars: _section) -> str: ...
|
||||
|
||||
class RawConfigParser(_parser):
|
||||
_SECT_TMPL: ClassVar[str] = ... # Undocumented
|
||||
@@ -188,7 +190,7 @@ class SectionProxy(MutableMapping[str, str]):
|
||||
def getboolean(
|
||||
self, option: str, fallback: _T = ..., *, raw: bool = ..., vars: Optional[_section] = ...
|
||||
) -> Union[bool, _T]: ...
|
||||
# SectionProxy can have arbitrary attributes when custon converters are used
|
||||
# SectionProxy can have arbitrary attributes when custom converters are used
|
||||
def __getattr__(self, key: str) -> Callable[..., Any]: ...
|
||||
|
||||
class ConverterMapping(MutableMapping[str, Optional[_converter]]):
|
||||
|
||||
@@ -36,15 +36,25 @@ class CDLL(object):
|
||||
_name: str = ...
|
||||
_handle: int = ...
|
||||
_FuncPtr: Type[_FuncPointer] = ...
|
||||
def __init__(
|
||||
self,
|
||||
name: Optional[str],
|
||||
mode: int = ...,
|
||||
handle: Optional[int] = ...,
|
||||
use_errno: bool = ...,
|
||||
use_last_error: bool = ...,
|
||||
winmode: Optional[int] = ...,
|
||||
) -> None: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def __init__(
|
||||
self,
|
||||
name: Optional[str],
|
||||
mode: int = ...,
|
||||
handle: Optional[int] = ...,
|
||||
use_errno: bool = ...,
|
||||
use_last_error: bool = ...,
|
||||
winmode: Optional[int] = ...,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
name: Optional[str],
|
||||
mode: int = ...,
|
||||
handle: Optional[int] = ...,
|
||||
use_errno: bool = ...,
|
||||
use_last_error: bool = ...,
|
||||
) -> None: ...
|
||||
def __getattr__(self, name: str) -> _NamedFuncPointer: ...
|
||||
def __getitem__(self, name: str) -> _NamedFuncPointer: ...
|
||||
|
||||
@@ -151,7 +161,7 @@ def byref(obj: _CData, offset: int = ...) -> _CArgObject: ...
|
||||
|
||||
_CastT = TypeVar("_CastT", bound=_CanCastTo)
|
||||
|
||||
def cast(obj: _UnionT[_CData, _CArgObject, int], type: Type[_CastT]) -> _CastT: ...
|
||||
def cast(obj: _UnionT[_CData, _CArgObject, int], typ: Type[_CastT]) -> _CastT: ...
|
||||
def create_string_buffer(init: _UnionT[int, bytes], size: Optional[int] = ...) -> Array[c_char]: ...
|
||||
|
||||
c_buffer = create_string_buffer
|
||||
|
||||
Reference in New Issue
Block a user