id int64 1 6.07M | name stringlengths 1 295 | code stringlengths 12 426k | language stringclasses 1
value | source_file stringlengths 5 202 | start_line int64 1 158k | end_line int64 1 158k | repo dict |
|---|---|---|---|---|---|---|---|
6,069,201 | __ne__ | def __ne__(self, other):
# type: (Any) -> bool
return not self.__eq__(other) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/error.py | 54 | 56 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,202 | __init__ | def __init__(self, name, index, line, column, buffer, pointer):
# type: (Any, int, int, int, Any, Any) -> None
StreamMark.__init__(self, name, index, line, column)
self.buffer = buffer
self.pointer = pointer | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/error.py | 66 | 70 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,203 | get_snippet | def get_snippet(self, indent=4, max_length=75):
# type: (int, int) -> Any
if self.buffer is None: # always False
return None
head = ""
start = self.pointer
while start > 0 and self.buffer[start - 1] not in u"\0\r\n\x85\u2028\u2029":
start -= 1
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/error.py | 72 | 105 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,204 | __str__ | def __str__(self):
# type: () -> Any
snippet = self.get_snippet()
where = ' in "%s", line %d, column %d' % (
self.name,
self.line + 1,
self.column + 1,
)
if snippet is not None:
where += ":\n" + snippet
return where | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/error.py | 107 | 117 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,205 | __init__ | def __init__(self, column):
# type: (Any) -> None
self.column = column | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/error.py | 123 | 125 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,206 | __init__ | def __init__(
self,
context=None,
context_mark=None,
problem=None,
problem_mark=None,
note=None,
warn=None,
):
# type: (Any, Any, Any, Any, Any, Any) -> None
self.context = context
self.context_mark = context_mark
self.problem =... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/error.py | 133 | 148 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,207 | __str__ | def __str__(self):
# type: () -> Any
lines = [] # type: List[str]
if self.context is not None:
lines.append(self.context)
if self.context_mark is not None and (
self.problem is None
or self.problem_mark is None
or self.context_mark.name !=... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/error.py | 150 | 170 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,208 | __init__ | def __init__(
self,
context=None,
context_mark=None,
problem=None,
problem_mark=None,
note=None,
warn=None,
):
# type: (Any, Any, Any, Any, Any, Any) -> None
self.context = context
self.context_mark = context_mark
self.problem =... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/error.py | 182 | 197 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,209 | __str__ | def __str__(self):
# type: () -> Any
lines = [] # type: List[str]
if self.context is not None:
lines.append(self.context)
if self.context_mark is not None and (
self.problem is None
or self.problem_mark is None
or self.context_mark.name !=... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/error.py | 199 | 222 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,210 | __init__ | def __init__(self, node, flt_str):
# type: (Any, Any) -> None
self.node = node
self.flt = flt_str | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/error.py | 246 | 249 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,211 | __str__ | def __str__(self):
# type: () -> Any
line = self.node.start_mark.line
col = self.node.start_mark.column
return """
In YAML 1.1 floating point values should have a dot ('.') in their mantissa.
See the Floating-Point Language-Independent Type for YAML™ Version 1.1 specification
( http://ya... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/error.py | 251 | 269 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,212 | __init__ | def __init__(
self,
context=None,
context_mark=None,
problem=None,
problem_mark=None,
note=None,
warn=None,
):
# type: (Any, Any, Any, Any, Any, Any) -> None
self.context = context
self.context_mark = context_mark
self.problem =... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/error.py | 280 | 295 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,213 | __str__ | def __str__(self):
# type: () -> Any
lines = [] # type: List[str]
if self.context is not None:
lines.append(self.context)
if self.context_mark is not None and (
self.problem is None
or self.problem_mark is None
or self.context_mark.name !... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/error.py | 297 | 321 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,214 | __init__ | def __init__(self):
# type: () -> None
self.value = None
self.always_dump = False | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/anchor.py | 12 | 15 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,215 | __repr__ | def __repr__(self):
# type: () -> Any
ad = ', (always dump)' if self.always_dump else ""
return 'Anchor({!r}{})'.format(self.value, ad) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/anchor.py | 17 | 20 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,216 | __init__ | def __init__(self, preserve_quotes=None, loader=None):
# type: (Optional[bool], Any) -> None
self.loader = loader
if (
self.loader is not None
and getattr(self.loader, "_constructor", None) is None
):
self.loader._constructor = self
self.loader... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 62 | 78 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,217 | composer | def composer(self):
# type: () -> Any
if hasattr(self.loader, "typ"):
return self.loader.composer
try:
return self.loader._composer
except AttributeError:
sys.stdout.write("slt {}\n".format(type(self)))
sys.stdout.write("slc {}\n".format(se... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 81 | 91 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,218 | resolver | def resolver(self):
# type: () -> Any
if hasattr(self.loader, "typ"):
return self.loader.resolver
return self.loader._resolver | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 94 | 98 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,219 | check_data | def check_data(self):
# type: () -> Any
# If there are more documents available?
return self.composer.check_node() | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 100 | 103 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,220 | get_data | def get_data(self):
# type: () -> Any
# Construct and return the next document.
if self.composer.check_node():
return self.construct_document(self.composer.get_node()) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 105 | 109 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,221 | get_single_data | def get_single_data(self):
# type: () -> Any
# Ensure that the stream contains a single document and construct it.
node = self.composer.get_single_node()
if node is not None:
return self.construct_document(node)
return None | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 111 | 117 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,222 | construct_document | def construct_document(self, node):
# type: (Any) -> Any
data = self.construct_object(node)
while bool(self.state_generators):
state_generators = self.state_generators
self.state_generators = []
for generator in state_generators:
for _dummy in ... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 119 | 131 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,223 | construct_object | def construct_object(self, node, deep=False):
# type: (Any, bool) -> Any
"""deep is True when creating an object/mapping recursively,
in that case want the underlying elements available during construction
"""
if node in self.constructed_objects:
return self.construct... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 133 | 155 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,224 | construct_non_recursive_object | def construct_non_recursive_object(self, node, tag=None):
# type: (Any, Optional[str]) -> Any
constructor = None # type: Any
tag_suffix = None
if tag is None:
tag = node.tag
if tag in self.yaml_constructors:
constructor = self.yaml_constructors[tag]
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 157 | 195 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,225 | construct_scalar | def construct_scalar(self, node):
# type: (Any) -> Any
if not isinstance(node, ScalarNode):
raise ConstructorError(
None,
None,
"expected a scalar node, but found %s" % node.id,
node.start_mark,
)
return node... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 197 | 206 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,226 | construct_sequence | def construct_sequence(self, node, deep=False):
# type: (Any, bool) -> Any
"""deep is True when creating an object/mapping recursively,
in that case want the underlying elements available during construction
"""
if not isinstance(node, SequenceNode):
raise Constructor... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 208 | 220 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,227 | construct_mapping | def construct_mapping(self, node, deep=False):
# type: (Any, bool) -> Any
"""deep is True when creating an object/mapping recursively,
in that case want the underlying elements available during construction
"""
if not isinstance(node, MappingNode):
raise ConstructorEr... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 222 | 274 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,228 | check_mapping_key | def check_mapping_key(self, node, key_node, mapping, key, value):
# type: (Any, Any, Any, Any, Any) -> bool
"""return True if key is unique"""
if key in mapping:
if not self.allow_duplicate_keys:
mk = mapping.get(key)
if PY2:
if isi... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 276 | 309 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,229 | check_set_key | def check_set_key(self, node, key_node, setting, key):
# type: (Any, Any, Any, Any, Any) -> None
if key in setting:
if not self.allow_duplicate_keys:
if PY2:
if isinstance(key, unicode):
key = key.encode("utf-8")
arg... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 311 | 335 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,230 | construct_pairs | def construct_pairs(self, node, deep=False):
# type: (Any, bool) -> Any
if not isinstance(node, MappingNode):
raise ConstructorError(
None,
None,
"expected a mapping node, but found %s" % node.id,
node.start_mark,
)
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 337 | 351 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,231 | add_constructor | def add_constructor(cls, tag, constructor):
# type: (Any, Any) -> None
if "yaml_constructors" not in cls.__dict__:
cls.yaml_constructors = cls.yaml_constructors.copy()
cls.yaml_constructors[tag] = constructor | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 354 | 358 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,232 | add_multi_constructor | def add_multi_constructor(cls, tag_prefix, multi_constructor):
# type: (Any, Any) -> None
if "yaml_multi_constructors" not in cls.__dict__:
cls.yaml_multi_constructors = cls.yaml_multi_constructors.copy()
cls.yaml_multi_constructors[tag_prefix] = multi_constructor | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 361 | 365 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,233 | construct_scalar | def construct_scalar(self, node):
# type: (Any) -> Any
if isinstance(node, MappingNode):
for key_node, value_node in node.value:
if key_node.tag == u"tag:yaml.org,2002:value":
return self.construct_scalar(value_node)
return BaseConstructor.construc... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 369 | 375 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,234 | flatten_mapping | def flatten_mapping(self, node):
# type: (Any) -> Any
"""
This implements the merge key feature http://yaml.org/type/merge.html
by inserting keys from the merge dict/list of dicts if not yet
available in this node
"""
merge = [] # type: List[Any]
index = ... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 377 | 449 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,235 | construct_mapping | def construct_mapping(self, node, deep=False):
# type: (Any, bool) -> Any
"""deep is True when creating an object/mapping recursively,
in that case want the underlying elements available during construction
"""
if isinstance(node, MappingNode):
self.flatten_mapping(no... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 451 | 458 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,236 | construct_yaml_null | def construct_yaml_null(self, node):
# type: (Any) -> Any
self.construct_scalar(node)
return None | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 460 | 463 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,237 | construct_yaml_bool | def construct_yaml_bool(self, node):
# type: (Any) -> bool
value = self.construct_scalar(node)
return self.bool_values[value.lower()] | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 477 | 480 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,238 | construct_yaml_int | def construct_yaml_int(self, node):
# type: (Any) -> int
value_s = to_str(self.construct_scalar(node))
value_s = value_s.replace("_", "")
sign = +1
if value_s[0] == "-":
sign = -1
if value_s[0] in "+-":
value_s = value_s[1:]
if value_s == "... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 482 | 511 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,239 | construct_yaml_float | def construct_yaml_float(self, node):
# type: (Any) -> float
value_so = to_str(self.construct_scalar(node))
value_s = value_so.replace("_", "").lower()
sign = +1
if value_s[0] == "-":
sign = -1
if value_s[0] in "+-":
value_s = value_s[1:]
i... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 518 | 546 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,240 | construct_yaml_binary | def construct_yaml_binary(self, node):
# type: (Any) -> Any
try:
value = self.construct_scalar(node).encode("ascii")
except UnicodeEncodeError as exc:
raise ConstructorError(
None,
None,
"fail... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 550 | 572 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,241 | construct_yaml_binary | def construct_yaml_binary(self, node):
# type: (Any) -> Any
value = self.construct_scalar(node)
try:
return to_str(value).decode("base64")
except (binascii.Error, UnicodeEncodeError) as exc:
raise ConstructorError(
None,... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 576 | 587 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,242 | construct_yaml_timestamp | def construct_yaml_timestamp(self, node, values=None):
# type: (Any, Any) -> Any
if values is None:
try:
match = self.timestamp_regexp.match(node.value)
except TypeError:
match = None
if match is None:
raise ConstructorE... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 603 | 653 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,243 | construct_yaml_omap | def construct_yaml_omap(self, node):
# type: (Any) -> Any
# Note: we do now check for duplicate keys
omap = ordereddict()
yield omap
if not isinstance(node, SequenceNode):
raise ConstructorError(
"while constructing an ordered map",
nod... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 655 | 687 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,244 | construct_yaml_pairs | def construct_yaml_pairs(self, node):
# type: (Any) -> Any
# Note: the same code as `construct_yaml_omap`.
pairs = [] # type: List[Any]
yield pairs
if not isinstance(node, SequenceNode):
raise ConstructorError(
"while constructing pairs",
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 689 | 720 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,245 | construct_yaml_set | def construct_yaml_set(self, node):
# type: (Any) -> Any
data = set() # type: Set[Any]
yield data
value = self.construct_mapping(node)
data.update(value) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 722 | 727 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,246 | construct_yaml_str | def construct_yaml_str(self, node):
# type: (Any) -> Any
value = self.construct_scalar(node)
if PY3:
return value
try:
return value.encode("ascii")
except UnicodeEncodeError:
return value | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 729 | 737 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,247 | construct_yaml_seq | def construct_yaml_seq(self, node):
# type: (Any) -> Any
data = self.yaml_base_list_type() # type: List[Any]
yield data
data.extend(self.construct_sequence(node)) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 739 | 743 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,248 | construct_yaml_map | def construct_yaml_map(self, node):
# type: (Any) -> Any
data = self.yaml_base_dict_type() # type: Dict[Any, Any]
yield data
value = self.construct_mapping(node)
data.update(value) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 745 | 750 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,249 | construct_yaml_object | def construct_yaml_object(self, node, cls):
# type: (Any, Any) -> Any
data = cls.__new__(cls)
yield data
if hasattr(data, "__setstate__"):
state = self.construct_mapping(node, deep=True)
data.__setstate__(state)
else:
state = self.construct_map... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 752 | 761 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,250 | construct_undefined | def construct_undefined(self, node):
# type: (Any) -> None
raise ConstructorError(
None,
None,
"could not determine a constructor for the tag %r" % utf8(node.tag),
node.start_mark,
) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 763 | 770 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,251 | construct_python_str | def construct_python_str(self, node):
raise ValueError("Unsafe constructor not implemented in this library") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 830 | 831 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,252 | construct_python_unicode | def construct_python_unicode(self, node):
raise ValueError("Unsafe constructor not implemented in this library") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 833 | 834 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,253 | construct_python_bytes | def construct_python_bytes(self, node):
raise ValueError("Unsafe constructor not implemented in this library") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 838 | 839 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,254 | construct_python_long | def construct_python_long(self, node):
raise ValueError("Unsafe constructor not implemented in this library") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 841 | 842 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,255 | construct_python_complex | def construct_python_complex(self, node):
raise ValueError("Unsafe constructor not implemented in this library") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 844 | 845 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,256 | construct_python_tuple | def construct_python_tuple(self, node):
raise ValueError("Unsafe constructor not implemented in this library") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 847 | 848 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,257 | find_python_module | def find_python_module(self, name, mark):
raise ValueError("Unsafe constructor not implemented in this library") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 850 | 851 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,258 | find_python_name | def find_python_name(self, name, mark):
raise ValueError("Unsafe constructor not implemented in this library") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 853 | 854 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,259 | construct_python_name | def construct_python_name(self, suffix, node):
raise ValueError("Unsafe constructor not implemented in this library") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 856 | 857 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,260 | construct_python_module | def construct_python_module(self, suffix, node):
raise ValueError("Unsafe constructor not implemented in this library") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 859 | 860 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,261 | make_python_instance | def make_python_instance(self, suffix, node, args=None, kwds=None, newobj=False):
raise ValueError("Unsafe constructor not implemented in this library") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 862 | 863 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,262 | set_python_instance_state | def set_python_instance_state(self, instance, state):
raise ValueError("Unsafe constructor not implemented in this library") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 865 | 866 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,263 | construct_python_object | def construct_python_object(self, suffix, node):
raise ValueError("Unsafe constructor not implemented in this library") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 868 | 869 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,264 | construct_python_object_apply | def construct_python_object_apply(self, suffix, node, newobj=False):
raise ValueError("Unsafe constructor not implemented in this library") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 871 | 872 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,265 | construct_python_object_new | def construct_python_object_new(self, suffix, node):
raise ValueError("Unsafe constructor not implemented in this library") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 874 | 875 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,266 | construct_scalar | def construct_scalar(self, node):
# type: (Any) -> Any
if not isinstance(node, ScalarNode):
raise ConstructorError(
None,
None,
"expected a scalar node, but found %s" % node.id,
node.start_mark,
)
if node.st... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 953 | 989 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,267 | construct_yaml_int | def construct_yaml_int(self, node):
# type: (Any) -> Any
width = None # type: Any
value_su = to_str(self.construct_scalar(node))
try:
sx = value_su.rstrip("_")
underscore = [len(sx) - sx.rindex("_") - 1, False, False] # type: Any
except ValueError:
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 991 | 1,085 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,268 | construct_yaml_float | def construct_yaml_float(self, node):
# type: (Any) -> Any
def leading_zeros(v):
# type: (Any) -> int
lead0 = 0
idx = 0
while idx < len(v) and v[idx] in "0.":
if v[idx] == "0":
lead0 += 1
idx += 1
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,087 | 1,164 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,269 | leading_zeros | def leading_zeros(v):
# type: (Any) -> int
lead0 = 0
idx = 0
while idx < len(v) and v[idx] in "0.":
if v[idx] == "0":
lead0 += 1
idx += 1
return lead0 | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,089 | 1,097 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,270 | construct_yaml_str | def construct_yaml_str(self, node):
# type: (Any) -> Any
value = self.construct_scalar(node)
if isinstance(value, ScalarString):
return value
if PY3:
return value
try:
return value.encode("ascii")
except AttributeError:
# in... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,166 | 1,179 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,271 | construct_rt_sequence | def construct_rt_sequence(self, node, seqtyp, deep=False):
# type: (Any, Any, bool) -> Any
if not isinstance(node, SequenceNode):
raise ConstructorError(
None,
None,
"expected a sequence node, but found %s" % node.id,
node.start... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,181 | 1,208 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,272 | flatten_mapping | def flatten_mapping(self, node):
# type: (Any) -> Any
"""
This implements the merge key feature http://yaml.org/type/merge.html
by inserting keys from the merge dict/list of dicts if not yet
available in this node
"""
def constructed(value_node):
# ty... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,210 | 1,296 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,273 | constructed | def constructed(value_node):
# type: (Any) -> Any
# If the contents of a merge are defined within the
# merge marker, then they won't have been constructed
# yet. But if they were already constructed, we need to use
# the existing object.
if value_... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,218 | 1,228 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,274 | _sentinel | def _sentinel(self):
# type: () -> None
pass | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,298 | 1,300 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,275 | construct_mapping | def construct_mapping(self, node, maptyp, deep=False): # type: ignore
# type: (Any, Any, bool) -> Any
if not isinstance(node, MappingNode):
raise ConstructorError(
None,
None,
"expected a mapping node, but found %s" % node.id,
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,302 | 1,392 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,276 | construct_setting | def construct_setting(self, node, typ, deep=False):
# type: (Any, Any, bool) -> Any
if not isinstance(node, MappingNode):
raise ConstructorError(
None,
None,
"expected a mapping node, but found %s" % node.id,
node.start_mark,
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,394 | 1,444 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,277 | construct_yaml_seq | def construct_yaml_seq(self, node):
# type: (Any) -> Any
data = CommentedSeq()
data._yaml_set_line_col(node.start_mark.line, node.start_mark.column)
if node.comment:
data._yaml_add_comment(node.comment)
yield data
data.extend(self.construct_rt_sequence(node, d... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,446 | 1,454 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,278 | construct_yaml_map | def construct_yaml_map(self, node):
# type: (Any) -> Any
data = CommentedMap()
data._yaml_set_line_col(node.start_mark.line, node.start_mark.column)
yield data
self.construct_mapping(node, data, deep=True)
self.set_collection_style(data, node) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,456 | 1,462 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,279 | set_collection_style | def set_collection_style(self, data, node):
# type: (Any, Any) -> None
if len(data) == 0:
return
if node.flow_style is True:
data.fa.set_flow_style()
elif node.flow_style is False:
data.fa.set_block_style() | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,464 | 1,471 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,280 | construct_yaml_object | def construct_yaml_object(self, node, cls):
# type: (Any, Any) -> Any
data = cls.__new__(cls)
yield data
if hasattr(data, "__setstate__"):
state = SafeConstructor.construct_mapping(self, node, deep=True)
data.__setstate__(state)
else:
state = S... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,473 | 1,482 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,281 | construct_yaml_omap | def construct_yaml_omap(self, node):
# type: (Any) -> Any
# Note: we do now check for duplicate keys
omap = CommentedOrderedMap()
omap._yaml_set_line_col(node.start_mark.line, node.start_mark.column)
if node.flow_style is True:
omap.fa.set_flow_style()
elif no... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,484 | 1,531 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,282 | construct_yaml_set | def construct_yaml_set(self, node):
# type: (Any) -> Any
data = CommentedSet()
data._yaml_set_line_col(node.start_mark.line, node.start_mark.column)
yield data
self.construct_setting(node, data) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,533 | 1,538 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,283 | construct_undefined | def construct_undefined(self, node):
# type: (Any) -> Any
try:
if isinstance(node, MappingNode):
data = CommentedMap()
data._yaml_set_line_col(node.start_mark.line, node.start_mark.column)
if node.flow_style is True:
data.fa... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,540 | 1,585 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,284 | construct_yaml_timestamp | def construct_yaml_timestamp(self, node, values=None):
# type: (Any, Any) -> Any
try:
match = self.timestamp_regexp.match(node.value)
except TypeError:
match = None
if match is None:
raise ConstructorError(
None,
None,
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,587 | 1,648 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,285 | construct_yaml_bool | def construct_yaml_bool(self, node):
# type: (Any) -> Any
b = SafeConstructor.construct_yaml_bool(self, node)
if node.anchor:
return ScalarBoolean(b, anchor=node.anchor)
return b | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/constructor.py | 1,650 | 1,655 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,286 | __init__ | def __init__(self, loader=None):
# type: (Any) -> None
self.loader = loader
if self.loader is not None and getattr(self.loader, "_composer", None) is None:
self.loader._composer = self
self.anchors = {} # type: Dict[Any, Any] | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/composer.py | 33 | 38 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,287 | parser | def parser(self):
# type: () -> Any
if hasattr(self.loader, "typ"):
self.loader.parser
return self.loader._parser | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/composer.py | 41 | 45 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,288 | resolver | def resolver(self):
# type: () -> Any
# assert self.loader._resolver is not None
if hasattr(self.loader, "typ"):
self.loader.resolver
return self.loader._resolver | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/composer.py | 48 | 53 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,289 | check_node | def check_node(self):
# type: () -> Any
# Drop the STREAM-START event.
if self.parser.check_event(StreamStartEvent):
self.parser.get_event()
# If there are more documents available?
return not self.parser.check_event(StreamEndEvent) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/composer.py | 55 | 62 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,290 | get_node | def get_node(self):
# type: () -> Any
# Get the root node of the next document.
if not self.parser.check_event(StreamEndEvent):
return self.compose_document() | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/composer.py | 64 | 68 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,291 | get_single_node | def get_single_node(self):
# type: () -> Any
# Drop the STREAM-START event.
self.parser.get_event()
# Compose a document if the stream is not empty.
document = None # type: Any
if not self.parser.check_event(StreamEndEvent):
document = self.compose_document(... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/composer.py | 70 | 93 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,292 | compose_document | def compose_document(self):
# type: (Any) -> Any
# Drop the DOCUMENT-START event.
self.parser.get_event()
# Compose the root node.
node = self.compose_node(None, None)
# Drop the DOCUMENT-END event.
self.parser.get_event()
self.anchors = {}
retu... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/composer.py | 95 | 107 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,293 | compose_node | def compose_node(self, parent, index):
# type: (Any, Any) -> Any
if self.parser.check_event(AliasEvent):
event = self.parser.get_event()
alias = event.anchor
if alias not in self.anchors:
raise ComposerError(
None,
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/composer.py | 109 | 145 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,294 | compose_scalar_node | def compose_scalar_node(self, anchor):
# type: (Any) -> Any
event = self.parser.get_event()
tag = event.tag
if tag is None or tag == u"!":
tag = self.resolver.resolve(ScalarNode, event.value, event.implicit)
node = ScalarNode(
tag,
event.value,... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/composer.py | 147 | 164 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,295 | compose_sequence_node | def compose_sequence_node(self, anchor):
# type: (Any) -> Any
start_event = self.parser.get_event()
tag = start_event.tag
if tag is None or tag == u"!":
tag = self.resolver.resolve(SequenceNode, None, start_event.implicit)
node = SequenceNode(
tag,
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/composer.py | 166 | 197 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,296 | compose_mapping_node | def compose_mapping_node(self, anchor):
# type: (Any) -> Any
start_event = self.parser.get_event()
tag = start_event.tag
if tag is None or tag == u"!":
tag = self.resolver.resolve(MappingNode, None, start_event.implicit)
node = MappingNode(
tag,
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/composer.py | 199 | 231 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,297 | check_end_doc_comment | def check_end_doc_comment(self, end_event, node):
# type: (Any, Any) -> None
if end_event.comment and end_event.comment[1]:
# pre comments on an end_event, no following to move to
if node.comment is None:
node.comment = [None, None]
assert not isinstan... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/composer.py | 233 | 243 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,298 | __init__ | def __init__(self, func, *args, **kwargs):
# type: (Any, Any, Any) -> None
def lazy_self():
# type: () -> Any
return_value = func(*args, **kwargs)
object.__setattr__(self, 'lazy_self', lambda: return_value)
return return_value
object.__setattr__(s... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/util.py | 30 | 38 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,299 | lazy_self | def lazy_self():
# type: () -> Any
return_value = func(*args, **kwargs)
object.__setattr__(self, 'lazy_self', lambda: return_value)
return return_value | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/util.py | 32 | 36 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,300 | __getattribute__ | def __getattribute__(self, name):
# type: (Any) -> Any
lazy_self = object.__getattribute__(self, 'lazy_self')
if name == 'lazy_self':
return lazy_self
return getattr(lazy_self(), name) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/util.py | 40 | 45 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.