mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-26 05:41:11 +08:00
Replace Flake8 checks with Ruff (except for flake8-pyi) (#11496)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -99,7 +99,7 @@ class object:
|
||||
@property
|
||||
def __class__(self) -> type[Self]: ...
|
||||
@__class__.setter
|
||||
def __class__(self, type: type[object], /) -> None: ... # noqa: F811
|
||||
def __class__(self, type: type[object], /) -> None: ...
|
||||
def __init__(self) -> None: ...
|
||||
def __new__(cls) -> Self: ...
|
||||
# N.B. `object.__setattr__` and `object.__delattr__` are heavily special-cased by type checkers.
|
||||
|
||||
@@ -803,7 +803,7 @@ def getfqdn(name: str = "") -> str: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
def create_connection(
|
||||
address: tuple[str | None, int],
|
||||
timeout: float | None = ..., # noqa: F811
|
||||
timeout: float | None = ...,
|
||||
source_address: _Address | None = None,
|
||||
*,
|
||||
all_errors: bool = False,
|
||||
@@ -811,7 +811,7 @@ if sys.version_info >= (3, 11):
|
||||
|
||||
else:
|
||||
def create_connection(
|
||||
address: tuple[str | None, int], timeout: float | None = ..., source_address: _Address | None = None # noqa: F811
|
||||
address: tuple[str | None, int], timeout: float | None = ..., source_address: _Address | None = None
|
||||
) -> socket: ...
|
||||
|
||||
def has_dualstack_ipv6() -> bool: ...
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Since this module defines "overload" it is not recognized by Ruff as typing.overload
|
||||
# ruff: noqa: F811
|
||||
# TODO: The collections import is required, otherwise mypy crashes.
|
||||
# https://github.com/python/mypy/issues/16744
|
||||
import collections # noqa: F401 # pyright: ignore
|
||||
|
||||
Reference in New Issue
Block a user