Improve __enter__ & constructor methods (#7114)

This commit is contained in:
Alex Waygood
2022-02-02 21:14:59 +00:00
committed by GitHub
parent 7ccbbdb30a
commit b4e97a1909
11 changed files with 39 additions and 21 deletions

View File

@@ -1,3 +1,4 @@
from _typeshed import Self
from typing import Any
log: Any
@@ -12,7 +13,7 @@ class TraceHeader:
self, root: str | None = ..., parent: str | None = ..., sampled: bool | None = ..., data: dict[str, Any] | None = ...
) -> None: ...
@classmethod
def from_header_str(cls, header): ...
def from_header_str(cls: type[Self], header) -> Self: ...
def to_header_str(self): ...
@property
def root(self): ...