diff --git a/third_party/2and3/yaml/__init__.pyi b/third_party/2and3/yaml/__init__.pyi index cecd3e896a66..8f2edec5804f 100644 --- a/third_party/2and3/yaml/__init__.pyi +++ b/third_party/2and3/yaml/__init__.pyi @@ -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 * diff --git a/third_party/2and3/yaml/constructor.pyi b/third_party/2and3/yaml/constructor.pyi index 1a6bf9b6ab95..40e9ea2f859c 100644 --- a/third_party/2and3/yaml/constructor.pyi +++ b/third_party/2and3/yaml/constructor.pyi @@ -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): diff --git a/third_party/2and3/yaml/representer.pyi b/third_party/2and3/yaml/representer.pyi index 425c0988b624..b10f36de7e08 100644 --- a/third_party/2and3/yaml/representer.pyi +++ b/third_party/2and3/yaml/representer.pyi @@ -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=...): ... diff --git a/third_party/2and3/yaml/resolver.pyi b/third_party/2and3/yaml/resolver.pyi index 2542db7e9127..0b5641e20ec6 100644 --- a/third_party/2and3/yaml/resolver.pyi +++ b/third_party/2and3/yaml/resolver.pyi @@ -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): ...