Skip to content

PyYaml: uncomment commented out imports and add missing classmethod decorators #1439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions third_party/2and3/yaml/__init__.pyi
Original file line number Diff line number Diff line change
@@ -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 *

Expand Down
2 changes: 2 additions & 0 deletions third_party/2and3/yaml/constructor.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 2 additions & 0 deletions third_party/2and3/yaml/representer.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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=...): ...
Expand Down
2 changes: 2 additions & 0 deletions third_party/2and3/yaml/resolver.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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): ...
Expand Down