mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-07 14:00:12 +08:00
Enable Ruff PLE (Pylint Error) (#13305)
This commit is contained in:
@@ -46,6 +46,7 @@ select = [
|
||||
"N", # pep8-naming
|
||||
"PGH", # pygrep-hooks
|
||||
"PLC", # Pylint Convention
|
||||
"PLE", # Pylint Error
|
||||
"PLR", # Pylint Refactor
|
||||
"RUF", # Ruff-specific and unused-noqa
|
||||
"TRY", # tryceratops
|
||||
|
||||
@@ -29,7 +29,7 @@ class _DefaultReturnProperty(Protocol[_T]):
|
||||
@overload
|
||||
def __get__(self, obj: object, owner: type[object] | None = None) -> _T: ...
|
||||
def __set__(self, obj: object, value: _T | None) -> None: ...
|
||||
def __del__(self, obj: object) -> None: ...
|
||||
def __del__(self) -> None: ...
|
||||
|
||||
def spawn_raw(function: Callable[..., object], *args: object, **kwargs: object) -> greenlet.greenlet: ...
|
||||
def sleep(seconds: float = 0, ref: bool = True) -> None: ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer
|
||||
from _typeshed import ReadableBuffer, Unused
|
||||
from collections.abc import Callable, Mapping
|
||||
from typing import Any, AnyStr, Generic, Literal, TypeVar, final, overload
|
||||
from typing_extensions import Self
|
||||
@@ -568,7 +568,7 @@ class Pattern(Generic[AnyStr]):
|
||||
timeout: float | None = None,
|
||||
) -> _regex.Scanner[bytes]: ...
|
||||
def __copy__(self) -> Self: ...
|
||||
def __deepcopy__(self) -> Self: ...
|
||||
def __deepcopy__(self, memo: Unused, /) -> Self: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
||||
|
||||
@@ -647,6 +647,6 @@ class Match(Generic[AnyStr]):
|
||||
@overload
|
||||
def __getitem__(self, key: int | str, /) -> AnyStr | Any: ...
|
||||
def __copy__(self) -> Self: ...
|
||||
def __deepcopy__(self) -> Self: ...
|
||||
def __deepcopy__(self, memo: Unused, /) -> Self: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
||||
|
||||
Reference in New Issue
Block a user