mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Add missing property in urllib.response, fix code types (#6108)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from email.message import Message
|
||||
from types import TracebackType
|
||||
@@ -46,7 +47,10 @@ class addinfo(addbase):
|
||||
|
||||
class addinfourl(addinfo):
|
||||
url: str
|
||||
code: int
|
||||
code: int | None
|
||||
if sys.version_info >= (3, 9):
|
||||
@property
|
||||
def status(self) -> int | None: ...
|
||||
def __init__(self, fp: IO[bytes], headers: Message, url: str, code: int | None = ...) -> None: ...
|
||||
def geturl(self) -> str: ...
|
||||
def getcode(self) -> int: ...
|
||||
def getcode(self) -> int | None: ...
|
||||
|
||||
Reference in New Issue
Block a user