mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
stdlib: Improve many __iter__ and constructor methods (#7112)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import sys
|
||||
import types
|
||||
from _typeshed import Self
|
||||
from collections.abc import Iterable, Mapping
|
||||
from datetime import datetime as _datetime
|
||||
from email._header_value_parser import (
|
||||
@@ -23,7 +24,7 @@ class BaseHeader(str):
|
||||
def name(self) -> str: ...
|
||||
@property
|
||||
def defects(self) -> tuple[MessageDefect, ...]: ...
|
||||
def __new__(cls, name: str, value: Any) -> BaseHeader: ...
|
||||
def __new__(cls: type[Self], name: str, value: Any) -> Self: ...
|
||||
def init(self, name: str, *, parse_tree: TokenList, defects: Iterable[MessageDefect]) -> None: ...
|
||||
def fold(self, *, policy: Policy) -> str: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user