mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Convert namedtuples to class syntax (#3321)
This commit is contained in:
@@ -25,27 +25,23 @@ class ResultMixin(object):
|
||||
@property
|
||||
def port(self) -> Optional[int]: ...
|
||||
|
||||
class SplitResult(
|
||||
NamedTuple(
|
||||
'SplitResult',
|
||||
[
|
||||
('scheme', str), ('netloc', str), ('path', str), ('query', str), ('fragment', str)
|
||||
]
|
||||
),
|
||||
ResultMixin
|
||||
):
|
||||
class _SplitResult(NamedTuple):
|
||||
scheme: str
|
||||
netloc: str
|
||||
path: str
|
||||
query: str
|
||||
fragment: str
|
||||
class SplitResult(_SplitResult, ResultMixin):
|
||||
def geturl(self) -> str: ...
|
||||
|
||||
class ParseResult(
|
||||
NamedTuple(
|
||||
'ParseResult',
|
||||
[
|
||||
('scheme', str), ('netloc', str), ('path', str), ('params', str), ('query', str),
|
||||
('fragment', str)
|
||||
]
|
||||
),
|
||||
ResultMixin
|
||||
):
|
||||
class _ParseResult(NamedTuple):
|
||||
scheme: str
|
||||
netloc: str
|
||||
path: str
|
||||
params: str
|
||||
query: str
|
||||
fragment: str
|
||||
class ParseResult(_ParseResult, ResultMixin):
|
||||
def geturl(self) -> str: ...
|
||||
|
||||
def urlparse(url: _String, scheme: _String = ...,
|
||||
|
||||
Reference in New Issue
Block a user