-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
The python 2 stubs have the class variables:
Lines 40 to 48 in 67e38b6
class HTTPConnection: | |
response_class = ... # type: Any | |
default_port = ... # type: Any | |
auto_open = ... # type: Any | |
debuglevel = ... # type: Any | |
strict = ... # type: Any | |
timeout = ... # type: Any | |
source_address = ... # type: Any | |
sock = ... # type: Any |
but the python 3 stubs do not:
typeshed/stdlib/3/http/client.pyi
Lines 127 to 141 in f6b60cb
class HTTPConnection: | |
if sys.version_info >= (3, 4): | |
def __init__( | |
self, | |
host: str, port: Optional[int] = ..., | |
timeout: int = ..., | |
source_address: Optional[Tuple[str, int]] = ... | |
) -> None: ... | |
else: | |
def __init__( | |
self, | |
host: str, port: Optional[int] = ..., | |
strict: bool = ..., timeout: int = ..., | |
source_address: Optional[Tuple[str, int]] = ... | |
)-> None: ... |
This causes a mypy error with the following:
error: "Type[HTTPConnection]" has no attribute "debuglevel"
If all that needs to be done is to add the hints for those class variables, then I don't mind making a PR to do so.
Please let me know if I should make the PR or if I have the error wrong and the problem is somewhere else.
Metadata
Metadata
Assignees
Labels
No labels