diff --git a/stubs/PySocks/sockshandler.pyi b/stubs/PySocks/sockshandler.pyi index 7f13c16bf100..94d1ceec399f 100644 --- a/stubs/PySocks/sockshandler.pyi +++ b/stubs/PySocks/sockshandler.pyi @@ -4,7 +4,6 @@ import sys import urllib.request from _typeshed import Incomplete, SupportsKeysAndGetItem from typing import Any, TypeVar -from typing_extensions import override import socks @@ -33,7 +32,6 @@ class SocksiPyConnection(http.client.HTTPConnection): # undocumented source_address: tuple[str, int] | None = None, blocksize: int = 8192, ) -> None: ... - @override def connect(self) -> None: ... class SocksiPyConnectionS(http.client.HTTPSConnection): # undocumented @@ -77,7 +75,6 @@ class SocksiPyConnectionS(http.client.HTTPSConnection): # undocumented blocksize: int = 8192, ) -> None: ... - @override def connect(self) -> None: ... class SocksiPyHandler(urllib.request.HTTPHandler, urllib.request.HTTPSHandler): @@ -96,7 +93,5 @@ class SocksiPyHandler(urllib.request.HTTPHandler, urllib.request.HTTPSHandler): blocksize: int = 8192, **kwargs: Any, # any additional arguments to `SocksiPyConnection` or `SocksiPyConnectionS` ) -> None: ... - @override def http_open(self, req: urllib.request.Request) -> http.client.HTTPResponse: ... # undocumented - @override def https_open(self, req: urllib.request.Request) -> http.client.HTTPResponse: ... # undocumented diff --git a/stubs/gunicorn/gunicorn/app/base.pyi b/stubs/gunicorn/gunicorn/app/base.pyi index e23a7bae71f1..6e06417eca5d 100644 --- a/stubs/gunicorn/gunicorn/app/base.pyi +++ b/stubs/gunicorn/gunicorn/app/base.pyi @@ -1,6 +1,5 @@ from argparse import ArgumentParser, Namespace from typing import Any -from typing_extensions import override from gunicorn.config import Config from gunicorn.glogging import Logger as GLogger @@ -30,7 +29,5 @@ class Application(BaseApplication): def get_config_from_module_name(self, module_name: str) -> dict[str, Any]: ... def load_config_from_module_name_or_filename(self, location: str) -> dict[str, Any]: ... def load_config_from_file(self, filename: str) -> dict[str, Any]: ... - @override def load_config(self) -> None: ... - @override def run(self) -> None: ... diff --git a/stubs/gunicorn/gunicorn/app/wsgiapp.pyi b/stubs/gunicorn/gunicorn/app/wsgiapp.pyi index af744d5529a7..36e0cedc410f 100644 --- a/stubs/gunicorn/gunicorn/app/wsgiapp.pyi +++ b/stubs/gunicorn/gunicorn/app/wsgiapp.pyi @@ -1,5 +1,4 @@ from argparse import ArgumentParser, Namespace -from typing_extensions import override from gunicorn.app.base import Application @@ -8,13 +7,10 @@ from .._types import _WSGIAppType class WSGIApplication(Application): app_uri: str | None - @override def init(self, parser: ArgumentParser, opts: Namespace, args: list[str]) -> None: ... - @override def load_config(self) -> None: ... def load_wsgiapp(self) -> _WSGIAppType: ... def load_pasteapp(self) -> _WSGIAppType: ... - @override def load(self) -> _WSGIAppType: ... def run(prog: str | None = None) -> None: ... diff --git a/stubs/gunicorn/gunicorn/config.pyi b/stubs/gunicorn/gunicorn/config.pyi index c1420b1714c4..a6bd58c38b06 100644 --- a/stubs/gunicorn/gunicorn/config.pyi +++ b/stubs/gunicorn/gunicorn/config.pyi @@ -3,7 +3,7 @@ from _typeshed import ConvertibleToInt from collections.abc import Callable, Container from ssl import SSLContext, _SSLMethod from typing import Annotated, Any, ClassVar, overload -from typing_extensions import TypeAlias, override +from typing_extensions import TypeAlias from gunicorn.arbiter import Arbiter from gunicorn.glogging import Logger as GLogger @@ -90,7 +90,6 @@ class Config: def __init__(self, usage: str | None = None, prog: str | None = None) -> None: ... def __getattr__(self, name: str) -> Any: ... - @override def __setattr__(self, name: str, value: Any) -> None: ... def set(self, name: str, value: _ConfigValueType) -> None: ... def get_cmd_args_from_env(self) -> list[str]: ... diff --git a/stubs/gunicorn/gunicorn/glogging.pyi b/stubs/gunicorn/gunicorn/glogging.pyi index f5fde561830a..f04f94909706 100644 --- a/stubs/gunicorn/gunicorn/glogging.pyi +++ b/stubs/gunicorn/gunicorn/glogging.pyi @@ -5,7 +5,7 @@ from datetime import timedelta from logging.config import _DictConfigArgs from socket import SocketKind from typing import Annotated, Any, ClassVar, Literal, TypedDict, type_check_only -from typing_extensions import TypeAlias, override +from typing_extensions import TypeAlias from gunicorn.http import Request from gunicorn.http.wsgi import Response @@ -52,7 +52,6 @@ def loggers() -> list[logging.Logger]: ... class SafeAtoms(dict[str, Any]): def __init__(self, atoms: dict[str, Any]) -> None: ... - @override def __getitem__(self, k: str) -> str: ... _SyslogAddressType: TypeAlias = ( diff --git a/stubs/gunicorn/gunicorn/http/message.pyi b/stubs/gunicorn/gunicorn/http/message.pyi index 54e6057733ba..e72e5e71efad 100644 --- a/stubs/gunicorn/gunicorn/http/message.pyi +++ b/stubs/gunicorn/gunicorn/http/message.pyi @@ -1,6 +1,5 @@ import io import re -from typing_extensions import override from gunicorn.config import Config from gunicorn.http.body import Body @@ -51,12 +50,10 @@ class Request(Message): def __init__(self, cfg: Config, unreader: Unreader, peer_addr: _AddressType, req_number: int = 1) -> None: ... def get_data(self, unreader: Unreader, buf: io.BytesIO, stop: bool = False) -> None: ... - @override def parse(self, unreader: Unreader) -> bytes: ... def read_line(self, unreader: Unreader, buf: io.BytesIO, limit: int = 0) -> tuple[bytes, bytes]: ... def proxy_protocol(self, line: str) -> bool: ... def proxy_protocol_access_check(self) -> None: ... def parse_proxy_protocol(self, line: str) -> None: ... def parse_request_line(self, line_bytes: bytes) -> None: ... - @override def set_body_reader(self) -> None: ... diff --git a/stubs/gunicorn/gunicorn/http/unreader.pyi b/stubs/gunicorn/gunicorn/http/unreader.pyi index 78b47b7de7c2..be3da9d5d948 100644 --- a/stubs/gunicorn/gunicorn/http/unreader.pyi +++ b/stubs/gunicorn/gunicorn/http/unreader.pyi @@ -2,7 +2,6 @@ import io import socket from _typeshed import ReadableBuffer from collections.abc import Iterable, Iterator -from typing_extensions import override class Unreader: buf: io.BytesIO @@ -17,12 +16,10 @@ class SocketUnreader(Unreader): mxchunk: int def __init__(self, sock: socket.socket, max_chunk: int = 8192) -> None: ... - @override def chunk(self) -> bytes: ... class IterUnreader(Unreader): iter: Iterator[bytes] | None def __init__(self, iterable: Iterable[bytes]) -> None: ... - @override def chunk(self) -> bytes: ... diff --git a/stubs/gunicorn/gunicorn/http/wsgi.pyi b/stubs/gunicorn/gunicorn/http/wsgi.pyi index 619cf02bd45f..be6037952d5e 100644 --- a/stubs/gunicorn/gunicorn/http/wsgi.pyi +++ b/stubs/gunicorn/gunicorn/http/wsgi.pyi @@ -5,7 +5,6 @@ import socket from _typeshed import ReadableBuffer from collections.abc import Callable from typing import Any -from typing_extensions import override from gunicorn.config import Config from gunicorn.http import Request @@ -28,7 +27,6 @@ class WSGIErrorsWrapper(io.RawIOBase): streams: list[io.TextIOBase] def __init__(self, cfg: Config) -> None: ... - @override def write(self, data: ReadableBuffer) -> None: ... def base_environ(cfg: Config) -> _EnvironType: ... diff --git a/stubs/gunicorn/gunicorn/instrument/statsd.pyi b/stubs/gunicorn/gunicorn/instrument/statsd.pyi index 94b8ca80d018..5c47d55878c8 100644 --- a/stubs/gunicorn/gunicorn/instrument/statsd.pyi +++ b/stubs/gunicorn/gunicorn/instrument/statsd.pyi @@ -2,7 +2,6 @@ import logging import socket from collections.abc import Mapping from datetime import timedelta -from typing_extensions import override from gunicorn.config import Config from gunicorn.glogging import Logger @@ -26,7 +25,6 @@ class Statsd(Logger): cfg: Config def __init__(self, cfg: Config) -> None: ... - @override def critical( self, msg: object, @@ -36,7 +34,6 @@ class Statsd(Logger): stacklevel: int = 1, extra: Mapping[str, object] | None = None, ) -> None: ... - @override def error( self, msg: object, @@ -46,7 +43,6 @@ class Statsd(Logger): stacklevel: int = 1, extra: Mapping[str, object] | None = None, ) -> None: ... - @override def warning( self, msg: object, @@ -56,7 +52,6 @@ class Statsd(Logger): stacklevel: int = 1, extra: Mapping[str, object] | None = None, ) -> None: ... - @override def info( self, msg: object, @@ -66,7 +61,6 @@ class Statsd(Logger): stacklevel: int = 1, extra: Mapping[str, object] | None = None, ) -> None: ... - @override def debug( self, msg: object, @@ -76,7 +70,6 @@ class Statsd(Logger): stacklevel: int = 1, extra: Mapping[str, object] | None = None, ) -> None: ... - @override def exception( self, msg: object, @@ -86,7 +79,6 @@ class Statsd(Logger): stacklevel: int = 1, extra: Mapping[str, object] | None = None, ) -> None: ... - @override def log( self, lvl: _LogLevelType, @@ -97,7 +89,6 @@ class Statsd(Logger): stacklevel: int = 1, extra: Mapping[str, object] | None = None, ) -> None: ... - @override def access(self, resp: Response, req: Request, environ: _EnvironType, request_time: timedelta) -> None: ... def gauge(self, name: str, value: float) -> None: ... def increment(self, name: str, value: int, sampling_rate: float = 1.0) -> None: ... diff --git a/stubs/gunicorn/gunicorn/reloader.pyi b/stubs/gunicorn/gunicorn/reloader.pyi index e666355e2638..6d12d8fd3a8a 100644 --- a/stubs/gunicorn/gunicorn/reloader.pyi +++ b/stubs/gunicorn/gunicorn/reloader.pyi @@ -3,7 +3,7 @@ import threading from collections.abc import Callable, Iterable from re import Pattern from typing import NoReturn, TypedDict, type_check_only -from typing_extensions import TypeAlias, override +from typing_extensions import TypeAlias COMPILED_EXT_RE: Pattern[str] @@ -15,7 +15,6 @@ class Reloader(threading.Thread): ) -> None: ... def add_extra_file(self, filename: str) -> None: ... def get_files(self) -> list[str]: ... - @override def run(self) -> None: ... has_inotify: bool @@ -28,7 +27,6 @@ if sys.platform == "linux": def __init__(self, extra_files: Iterable[str] | None = None, callback: Callable[[str], None] | None = None) -> None: ... def add_extra_file(self, filename: str) -> None: ... def get_dirs(self) -> set[str]: ... - @override def run(self) -> None: ... else: diff --git a/stubs/gunicorn/gunicorn/sock.pyi b/stubs/gunicorn/gunicorn/sock.pyi index f2e7cf8d35da..4ce1b77cf857 100644 --- a/stubs/gunicorn/gunicorn/sock.pyi +++ b/stubs/gunicorn/gunicorn/sock.pyi @@ -3,7 +3,6 @@ import sys from collections.abc import Iterable from ssl import SSLContext, SSLSocket from typing import Any, ClassVar, Literal, SupportsIndex -from typing_extensions import override from gunicorn.glogging import Logger as GLogger @@ -19,7 +18,6 @@ class BaseSocket: class TCPSocket(BaseSocket): FAMILY: ClassVar[Literal[socket.AddressFamily.AF_INET, socket.AddressFamily.AF_INET6]] - @override def set_options(self, sock: socket.socket, bound: bool = False) -> socket.socket: ... class TCP6Socket(TCPSocket): @@ -32,7 +30,6 @@ class UnixSocket(BaseSocket): FAMILY: ClassVar[Literal[0]] # Stub for windows def __init__(self, addr: str, conf: Config, log: GLogger, fd: SupportsIndex | None = None) -> None: ... - @override def bind(self, sock: socket.socket) -> None: ... def create_sockets(conf: Config, log: GLogger, fds: Iterable[SupportsIndex] | None = None) -> list[BaseSocket]: ... diff --git a/stubs/gunicorn/gunicorn/workers/geventlet.pyi b/stubs/gunicorn/gunicorn/workers/geventlet.pyi index 5bbcd54c432d..481996a13837 100644 --- a/stubs/gunicorn/gunicorn/workers/geventlet.pyi +++ b/stubs/gunicorn/gunicorn/workers/geventlet.pyi @@ -1,6 +1,6 @@ from types import FrameType from typing import Any -from typing_extensions import TypeAlias, override +from typing_extensions import TypeAlias from gunicorn.workers.base_async import AsyncWorker @@ -15,17 +15,10 @@ def patch_sendfile() -> None: ... class EventletWorker(AsyncWorker): def patch(self) -> None: ... - @override def is_already_handled(self, respiter: object) -> bool: ... - @override def init_process(self) -> None: ... - @override def handle_quit(self, sig: int, frame: FrameType | None) -> None: ... - @override def handle_usr1(self, sig: int, frame: FrameType | None) -> None: ... - @override def timeout_ctx(self) -> None: ... - @override def handle(self, listener: GreenSocket, client: GreenSocket, addr: _AddressType) -> None: ... - @override def run(self) -> None: ... diff --git a/stubs/gunicorn/gunicorn/workers/ggevent.pyi b/stubs/gunicorn/gunicorn/workers/ggevent.pyi index 3ebf48025c85..2fa479231291 100644 --- a/stubs/gunicorn/gunicorn/workers/ggevent.pyi +++ b/stubs/gunicorn/gunicorn/workers/ggevent.pyi @@ -1,6 +1,5 @@ from types import FrameType from typing import Any, ClassVar -from typing_extensions import override from gevent import pywsgi from gevent.pywsgi import WSGIHandler @@ -19,21 +18,13 @@ class GeventWorker(AsyncWorker): sockets: list[GeventSocket] def patch(self) -> None: ... - @override def notify(self) -> None: ... - @override def timeout_ctx(self) -> None: ... - @override def run(self) -> None: ... - @override def handle(self, listener: GeventSocket, client: GeventSocket, addr: _AddressType) -> None: ... - @override def handle_request(self, listener_name: str, req: Request, sock: GeventSocket, addr: _AddressType) -> bool: ... - @override def handle_quit(self, sig: int, frame: FrameType | None) -> None: ... - @override def handle_usr1(self, sig: int, frame: FrameType | None) -> None: ... - @override def init_process(self) -> None: ... class GeventResponse: diff --git a/stubs/gunicorn/gunicorn/workers/gtornado.pyi b/stubs/gunicorn/gunicorn/workers/gtornado.pyi index 13b0a3f96a40..83874241e5f4 100644 --- a/stubs/gunicorn/gunicorn/workers/gtornado.pyi +++ b/stubs/gunicorn/gunicorn/workers/gtornado.pyi @@ -1,6 +1,6 @@ from types import FrameType from typing import Any -from typing_extensions import TypeAlias, override +from typing_extensions import TypeAlias from gunicorn.workers.base import Worker @@ -17,12 +17,9 @@ class TornadoWorker(Worker): @classmethod def setup(cls) -> None: ... - @override def handle_exit(self, sig: int, frame: FrameType | None) -> None: ... def handle_request(self) -> None: ... def watchdog(self) -> None: ... def heartbeat(self) -> None: ... - @override def init_process(self) -> None: ... - @override def run(self) -> None: ... diff --git a/stubs/gunicorn/gunicorn/workers/sync.pyi b/stubs/gunicorn/gunicorn/workers/sync.pyi index 061e501df0a5..cf461d5e785c 100644 --- a/stubs/gunicorn/gunicorn/workers/sync.pyi +++ b/stubs/gunicorn/gunicorn/workers/sync.pyi @@ -1,5 +1,4 @@ import socket -from typing_extensions import override from gunicorn.http import Request from gunicorn.workers.base import Worker @@ -14,9 +13,7 @@ class SyncWorker(Worker): def is_parent_alive(self) -> bool: ... def run_for_one(self, timeout: int) -> None: ... def run_for_multiple(self, timeout: int) -> None: ... - @override def run(self) -> None: ... def handle(self, listener: socket.socket, client: socket.socket, addr: _AddressType) -> None: ... def handle_request(self, listener: socket.socket, req: Request, client: socket.socket, addr: tuple[str, int]) -> bool: ... - @override def handle_error(self, req: Request | None, client: socket.socket, addr: _AddressType, exc: BaseException) -> None: ... diff --git a/stubs/tensorflow/tensorflow/keras/layers/__init__.pyi b/stubs/tensorflow/tensorflow/keras/layers/__init__.pyi index db7a6b91aed7..bb98d35d29de 100644 --- a/stubs/tensorflow/tensorflow/keras/layers/__init__.pyi +++ b/stubs/tensorflow/tensorflow/keras/layers/__init__.pyi @@ -395,7 +395,6 @@ class MultiHeadAttention(Layer[Any, tf.Tensor]): autocast: bool = True, name: str | None = None, ) -> None: ... - # @override @overload # type: ignore[override] def __call__( self, diff --git a/stubs/tensorflow/tensorflow/keras/metrics.pyi b/stubs/tensorflow/tensorflow/keras/metrics.pyi index 1d2c21918ae9..eba434a93ace 100644 --- a/stubs/tensorflow/tensorflow/keras/metrics.pyi +++ b/stubs/tensorflow/tensorflow/keras/metrics.pyi @@ -1,7 +1,7 @@ from abc import ABCMeta, abstractmethod from collections.abc import Callable, Iterable, Sequence from typing import Any, Literal -from typing_extensions import Self, TypeAlias, override +from typing_extensions import Self, TypeAlias import tensorflow as tf from tensorflow import Operation, Tensor @@ -21,7 +21,6 @@ class Metric(tf.keras.layers.Layer[tf.Tensor, tf.Tensor], metaclass=ABCMeta): @abstractmethod def result(self) -> _Output: ... # Metric inherits from keras.Layer, but its add_weight method is incompatible with the one from "Layer". - @override def add_weight( # type: ignore[override] self, name: str,