Skip to content

Commit 6a7f319

Browse files
authored
Remove @OverRide annotations (#14806)
1 parent 602da37 commit 6a7f319

File tree

17 files changed

+6
-66
lines changed

17 files changed

+6
-66
lines changed

stubs/PySocks/sockshandler.pyi

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import sys
44
import urllib.request
55
from _typeshed import Incomplete, SupportsKeysAndGetItem
66
from typing import Any, TypeVar
7-
from typing_extensions import override
87

98
import socks
109

@@ -33,7 +32,6 @@ class SocksiPyConnection(http.client.HTTPConnection): # undocumented
3332
source_address: tuple[str, int] | None = None,
3433
blocksize: int = 8192,
3534
) -> None: ...
36-
@override
3735
def connect(self) -> None: ...
3836

3937
class SocksiPyConnectionS(http.client.HTTPSConnection): # undocumented
@@ -77,7 +75,6 @@ class SocksiPyConnectionS(http.client.HTTPSConnection): # undocumented
7775
blocksize: int = 8192,
7876
) -> None: ...
7977

80-
@override
8178
def connect(self) -> None: ...
8279

8380
class SocksiPyHandler(urllib.request.HTTPHandler, urllib.request.HTTPSHandler):
@@ -96,7 +93,5 @@ class SocksiPyHandler(urllib.request.HTTPHandler, urllib.request.HTTPSHandler):
9693
blocksize: int = 8192,
9794
**kwargs: Any, # any additional arguments to `SocksiPyConnection` or `SocksiPyConnectionS`
9895
) -> None: ...
99-
@override
10096
def http_open(self, req: urllib.request.Request) -> http.client.HTTPResponse: ... # undocumented
101-
@override
10297
def https_open(self, req: urllib.request.Request) -> http.client.HTTPResponse: ... # undocumented

stubs/gunicorn/gunicorn/app/base.pyi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from argparse import ArgumentParser, Namespace
22
from typing import Any
3-
from typing_extensions import override
43

54
from gunicorn.config import Config
65
from gunicorn.glogging import Logger as GLogger
@@ -30,7 +29,5 @@ class Application(BaseApplication):
3029
def get_config_from_module_name(self, module_name: str) -> dict[str, Any]: ...
3130
def load_config_from_module_name_or_filename(self, location: str) -> dict[str, Any]: ...
3231
def load_config_from_file(self, filename: str) -> dict[str, Any]: ...
33-
@override
3432
def load_config(self) -> None: ...
35-
@override
3633
def run(self) -> None: ...
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from argparse import ArgumentParser, Namespace
2-
from typing_extensions import override
32

43
from gunicorn.app.base import Application
54

@@ -8,13 +7,10 @@ from .._types import _WSGIAppType
87
class WSGIApplication(Application):
98
app_uri: str | None
109

11-
@override
1210
def init(self, parser: ArgumentParser, opts: Namespace, args: list[str]) -> None: ...
13-
@override
1411
def load_config(self) -> None: ...
1512
def load_wsgiapp(self) -> _WSGIAppType: ...
1613
def load_pasteapp(self) -> _WSGIAppType: ...
17-
@override
1814
def load(self) -> _WSGIAppType: ...
1915

2016
def run(prog: str | None = None) -> None: ...

stubs/gunicorn/gunicorn/config.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ from _typeshed import ConvertibleToInt
33
from collections.abc import Callable, Container
44
from ssl import SSLContext, _SSLMethod
55
from typing import Annotated, Any, ClassVar, overload
6-
from typing_extensions import TypeAlias, override
6+
from typing_extensions import TypeAlias
77

88
from gunicorn.arbiter import Arbiter
99
from gunicorn.glogging import Logger as GLogger
@@ -90,7 +90,6 @@ class Config:
9090

9191
def __init__(self, usage: str | None = None, prog: str | None = None) -> None: ...
9292
def __getattr__(self, name: str) -> Any: ...
93-
@override
9493
def __setattr__(self, name: str, value: Any) -> None: ...
9594
def set(self, name: str, value: _ConfigValueType) -> None: ...
9695
def get_cmd_args_from_env(self) -> list[str]: ...

stubs/gunicorn/gunicorn/glogging.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ from datetime import timedelta
55
from logging.config import _DictConfigArgs
66
from socket import SocketKind
77
from typing import Annotated, Any, ClassVar, Literal, TypedDict, type_check_only
8-
from typing_extensions import TypeAlias, override
8+
from typing_extensions import TypeAlias
99

1010
from gunicorn.http import Request
1111
from gunicorn.http.wsgi import Response
@@ -52,7 +52,6 @@ def loggers() -> list[logging.Logger]: ...
5252

5353
class SafeAtoms(dict[str, Any]):
5454
def __init__(self, atoms: dict[str, Any]) -> None: ...
55-
@override
5655
def __getitem__(self, k: str) -> str: ...
5756

5857
_SyslogAddressType: TypeAlias = (

stubs/gunicorn/gunicorn/http/message.pyi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import io
22
import re
3-
from typing_extensions import override
43

54
from gunicorn.config import Config
65
from gunicorn.http.body import Body
@@ -51,12 +50,10 @@ class Request(Message):
5150

5251
def __init__(self, cfg: Config, unreader: Unreader, peer_addr: _AddressType, req_number: int = 1) -> None: ...
5352
def get_data(self, unreader: Unreader, buf: io.BytesIO, stop: bool = False) -> None: ...
54-
@override
5553
def parse(self, unreader: Unreader) -> bytes: ...
5654
def read_line(self, unreader: Unreader, buf: io.BytesIO, limit: int = 0) -> tuple[bytes, bytes]: ...
5755
def proxy_protocol(self, line: str) -> bool: ...
5856
def proxy_protocol_access_check(self) -> None: ...
5957
def parse_proxy_protocol(self, line: str) -> None: ...
6058
def parse_request_line(self, line_bytes: bytes) -> None: ...
61-
@override
6259
def set_body_reader(self) -> None: ...

stubs/gunicorn/gunicorn/http/unreader.pyi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import io
22
import socket
33
from _typeshed import ReadableBuffer
44
from collections.abc import Iterable, Iterator
5-
from typing_extensions import override
65

76
class Unreader:
87
buf: io.BytesIO
@@ -17,12 +16,10 @@ class SocketUnreader(Unreader):
1716
mxchunk: int
1817

1918
def __init__(self, sock: socket.socket, max_chunk: int = 8192) -> None: ...
20-
@override
2119
def chunk(self) -> bytes: ...
2220

2321
class IterUnreader(Unreader):
2422
iter: Iterator[bytes] | None
2523

2624
def __init__(self, iterable: Iterable[bytes]) -> None: ...
27-
@override
2825
def chunk(self) -> bytes: ...

stubs/gunicorn/gunicorn/http/wsgi.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import socket
55
from _typeshed import ReadableBuffer
66
from collections.abc import Callable
77
from typing import Any
8-
from typing_extensions import override
98

109
from gunicorn.config import Config
1110
from gunicorn.http import Request
@@ -28,7 +27,6 @@ class WSGIErrorsWrapper(io.RawIOBase):
2827
streams: list[io.TextIOBase]
2928

3029
def __init__(self, cfg: Config) -> None: ...
31-
@override
3230
def write(self, data: ReadableBuffer) -> None: ...
3331

3432
def base_environ(cfg: Config) -> _EnvironType: ...

stubs/gunicorn/gunicorn/instrument/statsd.pyi

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import logging
22
import socket
33
from collections.abc import Mapping
44
from datetime import timedelta
5-
from typing_extensions import override
65

76
from gunicorn.config import Config
87
from gunicorn.glogging import Logger
@@ -26,7 +25,6 @@ class Statsd(Logger):
2625
cfg: Config
2726

2827
def __init__(self, cfg: Config) -> None: ...
29-
@override
3028
def critical(
3129
self,
3230
msg: object,
@@ -36,7 +34,6 @@ class Statsd(Logger):
3634
stacklevel: int = 1,
3735
extra: Mapping[str, object] | None = None,
3836
) -> None: ...
39-
@override
4037
def error(
4138
self,
4239
msg: object,
@@ -46,7 +43,6 @@ class Statsd(Logger):
4643
stacklevel: int = 1,
4744
extra: Mapping[str, object] | None = None,
4845
) -> None: ...
49-
@override
5046
def warning(
5147
self,
5248
msg: object,
@@ -56,7 +52,6 @@ class Statsd(Logger):
5652
stacklevel: int = 1,
5753
extra: Mapping[str, object] | None = None,
5854
) -> None: ...
59-
@override
6055
def info(
6156
self,
6257
msg: object,
@@ -66,7 +61,6 @@ class Statsd(Logger):
6661
stacklevel: int = 1,
6762
extra: Mapping[str, object] | None = None,
6863
) -> None: ...
69-
@override
7064
def debug(
7165
self,
7266
msg: object,
@@ -76,7 +70,6 @@ class Statsd(Logger):
7670
stacklevel: int = 1,
7771
extra: Mapping[str, object] | None = None,
7872
) -> None: ...
79-
@override
8073
def exception(
8174
self,
8275
msg: object,
@@ -86,7 +79,6 @@ class Statsd(Logger):
8679
stacklevel: int = 1,
8780
extra: Mapping[str, object] | None = None,
8881
) -> None: ...
89-
@override
9082
def log(
9183
self,
9284
lvl: _LogLevelType,
@@ -97,7 +89,6 @@ class Statsd(Logger):
9789
stacklevel: int = 1,
9890
extra: Mapping[str, object] | None = None,
9991
) -> None: ...
100-
@override
10192
def access(self, resp: Response, req: Request, environ: _EnvironType, request_time: timedelta) -> None: ...
10293
def gauge(self, name: str, value: float) -> None: ...
10394
def increment(self, name: str, value: int, sampling_rate: float = 1.0) -> None: ...

stubs/gunicorn/gunicorn/reloader.pyi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import threading
33
from collections.abc import Callable, Iterable
44
from re import Pattern
55
from typing import NoReturn, TypedDict, type_check_only
6-
from typing_extensions import TypeAlias, override
6+
from typing_extensions import TypeAlias
77

88
COMPILED_EXT_RE: Pattern[str]
99

@@ -15,7 +15,6 @@ class Reloader(threading.Thread):
1515
) -> None: ...
1616
def add_extra_file(self, filename: str) -> None: ...
1717
def get_files(self) -> list[str]: ...
18-
@override
1918
def run(self) -> None: ...
2019

2120
has_inotify: bool
@@ -28,7 +27,6 @@ if sys.platform == "linux":
2827
def __init__(self, extra_files: Iterable[str] | None = None, callback: Callable[[str], None] | None = None) -> None: ...
2928
def add_extra_file(self, filename: str) -> None: ...
3029
def get_dirs(self) -> set[str]: ...
31-
@override
3230
def run(self) -> None: ...
3331

3432
else:

0 commit comments

Comments
 (0)