mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-20 00:28:28 +08:00
Remove duplicate definitions in sub-classes (#8594)
This commit is contained in:
@@ -42,11 +42,7 @@ class TokenList(list[TokenList | Terminal]):
|
||||
def pprint(self, indent: str = ...) -> None: ...
|
||||
def ppstr(self, indent: str = ...) -> str: ...
|
||||
|
||||
class WhiteSpaceTokenList(TokenList):
|
||||
@property
|
||||
def value(self) -> str: ...
|
||||
@property
|
||||
def comments(self) -> list[str]: ...
|
||||
class WhiteSpaceTokenList(TokenList): ...
|
||||
|
||||
class UnstructuredTokenList(TokenList):
|
||||
token_type: str
|
||||
@@ -84,16 +80,12 @@ class QuotedString(TokenList):
|
||||
|
||||
class BareQuotedString(QuotedString):
|
||||
token_type: str
|
||||
@property
|
||||
def value(self) -> str: ...
|
||||
|
||||
class Comment(WhiteSpaceTokenList):
|
||||
token_type: str
|
||||
def quote(self, value: Any) -> str: ...
|
||||
@property
|
||||
def content(self) -> str: ...
|
||||
@property
|
||||
def comments(self) -> list[str]: ...
|
||||
|
||||
class AddressList(TokenList):
|
||||
token_type: str
|
||||
@@ -217,8 +209,6 @@ class AddrSpec(TokenList):
|
||||
@property
|
||||
def domain(self) -> str: ...
|
||||
@property
|
||||
def value(self) -> str: ...
|
||||
@property
|
||||
def addr_spec(self) -> str: ...
|
||||
|
||||
class ObsLocalPart(TokenList):
|
||||
@@ -227,18 +217,13 @@ class ObsLocalPart(TokenList):
|
||||
|
||||
class DisplayName(Phrase):
|
||||
token_type: str
|
||||
ew_combine_allowed: bool
|
||||
@property
|
||||
def display_name(self) -> str: ...
|
||||
@property
|
||||
def value(self) -> str: ...
|
||||
|
||||
class LocalPart(TokenList):
|
||||
token_type: str
|
||||
as_ew_allowed: bool
|
||||
@property
|
||||
def value(self) -> str: ...
|
||||
@property
|
||||
def local_part(self) -> str: ...
|
||||
|
||||
class DomainLiteral(TokenList):
|
||||
@@ -352,10 +337,7 @@ class ValueTerminal(Terminal):
|
||||
def value(self) -> ValueTerminal: ...
|
||||
def startswith_fws(self) -> bool: ...
|
||||
|
||||
class EWWhiteSpaceTerminal(WhiteSpaceTerminal):
|
||||
@property
|
||||
def value(self) -> str: ...
|
||||
|
||||
class EWWhiteSpaceTerminal(WhiteSpaceTerminal): ...
|
||||
class _InvalidEwError(HeaderParseError): ...
|
||||
|
||||
DOT: Final[ValueTerminal]
|
||||
|
||||
@@ -11,17 +11,11 @@ class Parser:
|
||||
def parse(self, fp: TextIO, headersonly: bool = ...) -> Message: ...
|
||||
def parsestr(self, text: str, headersonly: bool = ...) -> Message: ...
|
||||
|
||||
class HeaderParser(Parser):
|
||||
def __init__(self, _class: Callable[[], Message] | None = ..., *, policy: Policy = ...) -> None: ...
|
||||
def parse(self, fp: TextIO, headersonly: bool = ...) -> Message: ...
|
||||
def parsestr(self, text: str, headersonly: bool = ...) -> Message: ...
|
||||
|
||||
class BytesHeaderParser(BytesParser):
|
||||
def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ...
|
||||
def parse(self, fp: BinaryIO, headersonly: bool = ...) -> Message: ...
|
||||
def parsebytes(self, text: bytes, headersonly: bool = ...) -> Message: ...
|
||||
class HeaderParser(Parser): ...
|
||||
|
||||
class BytesParser:
|
||||
def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ...
|
||||
def parse(self, fp: BinaryIO, headersonly: bool = ...) -> Message: ...
|
||||
def parsebytes(self, text: bytes, headersonly: bool = ...) -> Message: ...
|
||||
|
||||
class BytesHeaderParser(BytesParser): ...
|
||||
|
||||
Reference in New Issue
Block a user