Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions stubs/PySocks/sockshandler.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand All @@ -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
3 changes: 0 additions & 3 deletions stubs/gunicorn/gunicorn/app/base.pyi
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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: ...
4 changes: 0 additions & 4 deletions stubs/gunicorn/gunicorn/app/wsgiapp.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from argparse import ArgumentParser, Namespace
from typing_extensions import override

from gunicorn.app.base import Application

Expand All @@ -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: ...
3 changes: 1 addition & 2 deletions stubs/gunicorn/gunicorn/config.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]: ...
Expand Down
3 changes: 1 addition & 2 deletions stubs/gunicorn/gunicorn/glogging.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = (
Expand Down
3 changes: 0 additions & 3 deletions stubs/gunicorn/gunicorn/http/message.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import io
import re
from typing_extensions import override

from gunicorn.config import Config
from gunicorn.http.body import Body
Expand Down Expand Up @@ -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: ...
3 changes: 0 additions & 3 deletions stubs/gunicorn/gunicorn/http/unreader.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: ...
2 changes: 0 additions & 2 deletions stubs/gunicorn/gunicorn/http/wsgi.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: ...
Expand Down
9 changes: 0 additions & 9 deletions stubs/gunicorn/gunicorn/instrument/statsd.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,7 +25,6 @@ class Statsd(Logger):
cfg: Config

def __init__(self, cfg: Config) -> None: ...
@override
def critical(
self,
msg: object,
Expand All @@ -36,7 +34,6 @@ class Statsd(Logger):
stacklevel: int = 1,
extra: Mapping[str, object] | None = None,
) -> None: ...
@override
def error(
self,
msg: object,
Expand All @@ -46,7 +43,6 @@ class Statsd(Logger):
stacklevel: int = 1,
extra: Mapping[str, object] | None = None,
) -> None: ...
@override
def warning(
self,
msg: object,
Expand All @@ -56,7 +52,6 @@ class Statsd(Logger):
stacklevel: int = 1,
extra: Mapping[str, object] | None = None,
) -> None: ...
@override
def info(
self,
msg: object,
Expand All @@ -66,7 +61,6 @@ class Statsd(Logger):
stacklevel: int = 1,
extra: Mapping[str, object] | None = None,
) -> None: ...
@override
def debug(
self,
msg: object,
Expand All @@ -76,7 +70,6 @@ class Statsd(Logger):
stacklevel: int = 1,
extra: Mapping[str, object] | None = None,
) -> None: ...
@override
def exception(
self,
msg: object,
Expand All @@ -86,7 +79,6 @@ class Statsd(Logger):
stacklevel: int = 1,
extra: Mapping[str, object] | None = None,
) -> None: ...
@override
def log(
self,
lvl: _LogLevelType,
Expand All @@ -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: ...
Expand Down
4 changes: 1 addition & 3 deletions stubs/gunicorn/gunicorn/reloader.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand All @@ -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
Expand All @@ -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:
Expand Down
3 changes: 0 additions & 3 deletions stubs/gunicorn/gunicorn/sock.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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):
Expand All @@ -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]: ...
Expand Down
9 changes: 1 addition & 8 deletions stubs/gunicorn/gunicorn/workers/geventlet.pyi
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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: ...
9 changes: 0 additions & 9 deletions stubs/gunicorn/gunicorn/workers/ggevent.pyi
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand Down
5 changes: 1 addition & 4 deletions stubs/gunicorn/gunicorn/workers/gtornado.pyi
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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: ...
3 changes: 0 additions & 3 deletions stubs/gunicorn/gunicorn/workers/sync.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import socket
from typing_extensions import override

from gunicorn.http import Request
from gunicorn.workers.base import Worker
Expand All @@ -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: ...
1 change: 0 additions & 1 deletion stubs/tensorflow/tensorflow/keras/layers/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions stubs/tensorflow/tensorflow/keras/metrics.pyi
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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,
Expand Down