mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-19 18:31:14 +08:00
PyYaml: uncomment commented out imports and add missing classmethod decorators (#1439)
* uncomment yaml imports * yaml: decorate classmethods
This commit is contained in:
12
third_party/2and3/yaml/__init__.pyi
vendored
12
third_party/2and3/yaml/__init__.pyi
vendored
@@ -1,10 +1,10 @@
|
||||
from typing import Any
|
||||
# from yaml.error import *
|
||||
# from yaml.tokens import *
|
||||
# from yaml.events import *
|
||||
# from yaml.nodes import *
|
||||
# from yaml.loader import *
|
||||
# from yaml.dumper import *
|
||||
from yaml.error import * # noqa: F403
|
||||
from yaml.tokens import * # noqa: F403
|
||||
from yaml.events import * # noqa: F403
|
||||
from yaml.nodes import * # noqa: F403
|
||||
from yaml.loader import * # noqa: F403
|
||||
from yaml.dumper import * # noqa: F403
|
||||
# TODO: stubs for cyaml?
|
||||
# from cyaml import *
|
||||
|
||||
|
||||
2
third_party/2and3/yaml/constructor.pyi
vendored
2
third_party/2and3/yaml/constructor.pyi
vendored
@@ -22,7 +22,9 @@ class BaseConstructor:
|
||||
def construct_sequence(self, node, deep=...): ...
|
||||
def construct_mapping(self, node, deep=...): ...
|
||||
def construct_pairs(self, node, deep=...): ...
|
||||
@classmethod
|
||||
def add_constructor(cls, tag, constructor): ...
|
||||
@classmethod
|
||||
def add_multi_constructor(cls, tag_prefix, multi_constructor): ...
|
||||
|
||||
class SafeConstructor(BaseConstructor):
|
||||
|
||||
2
third_party/2and3/yaml/representer.pyi
vendored
2
third_party/2and3/yaml/representer.pyi
vendored
@@ -15,7 +15,9 @@ class BaseRepresenter:
|
||||
def represent(self, data): ...
|
||||
def get_classobj_bases(self, cls): ...
|
||||
def represent_data(self, data): ...
|
||||
@classmethod
|
||||
def add_representer(cls, data_type, representer): ...
|
||||
@classmethod
|
||||
def add_multi_representer(cls, data_type, representer): ...
|
||||
def represent_scalar(self, tag, value, style=...): ...
|
||||
def represent_sequence(self, tag, sequence, flow_style=...): ...
|
||||
|
||||
2
third_party/2and3/yaml/resolver.pyi
vendored
2
third_party/2and3/yaml/resolver.pyi
vendored
@@ -12,7 +12,9 @@ class BaseResolver:
|
||||
resolver_exact_paths = ... # type: Any
|
||||
resolver_prefix_paths = ... # type: Any
|
||||
def __init__(self) -> None: ...
|
||||
@classmethod
|
||||
def add_implicit_resolver(cls, tag, regexp, first): ...
|
||||
@classmethod
|
||||
def add_path_resolver(cls, tag, path, kind=...): ...
|
||||
def descend_resolver(self, current_node, current_index): ...
|
||||
def ascend_resolver(self): ...
|
||||
|
||||
Reference in New Issue
Block a user