mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-23 04:11:28 +08:00
Use PEP 585 syntax in @python2/_ast, convert more TypeVars to _typeshed.Self, & # noqa a SQLAlchemy line (#6954)
* Manual fixes for `_ast` and `SQLAlchemy` * Change more `TypeVar`s to `Self`, using script
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from array import array
|
||||
from typing import (
|
||||
Any,
|
||||
@@ -74,15 +75,15 @@ class _CData(metaclass=_CDataMeta):
|
||||
_b_needsfree_: bool = ...
|
||||
_objects: Mapping[Any, int] | None = ...
|
||||
@classmethod
|
||||
def from_buffer(cls: type[_CT], source: _WritableBuffer, offset: int = ...) -> _CT: ...
|
||||
def from_buffer(cls: type[Self], source: _WritableBuffer, offset: int = ...) -> Self: ...
|
||||
@classmethod
|
||||
def from_buffer_copy(cls: type[_CT], source: _ReadOnlyBuffer, offset: int = ...) -> _CT: ...
|
||||
def from_buffer_copy(cls: type[Self], source: _ReadOnlyBuffer, offset: int = ...) -> Self: ...
|
||||
@classmethod
|
||||
def from_address(cls: type[_CT], address: int) -> _CT: ...
|
||||
def from_address(cls: type[Self], address: int) -> Self: ...
|
||||
@classmethod
|
||||
def from_param(cls: type[_CT], obj: Any) -> _UnionT[_CT, _CArgObject]: ...
|
||||
@classmethod
|
||||
def in_dll(cls: type[_CT], library: CDLL, name: str) -> _CT: ...
|
||||
def in_dll(cls: type[Self], library: CDLL, name: str) -> Self: ...
|
||||
|
||||
class _CanCastTo(_CData): ...
|
||||
class _PointerLike(_CanCastTo): ...
|
||||
|
||||
Reference in New Issue
Block a user