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,401 | __repr__ | def __repr__(self):
# type: () -> Any
# attributes = [key for key in self.__slots__ if not key.endswith('_mark') and
# hasattr('self', key)]
attributes = [key for key in self.__slots__ if not key.endswith('_mark')]
attributes.sort()
arguments = ', '.join(['%... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 21 | 37 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,402 | add_post_comment | def add_post_comment(self, comment):
# type: (Any) -> None
if not hasattr(self, '_comment'):
self._comment = [None, None]
self._comment[0] = comment | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 39 | 43 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,403 | add_pre_comments | def add_pre_comments(self, comments):
# type: (Any) -> None
if not hasattr(self, '_comment'):
self._comment = [None, None]
assert self._comment[1] is None
self._comment[1] = comments | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 45 | 50 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,404 | get_comment | def get_comment(self):
# type: () -> Any
return getattr(self, '_comment', None) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 52 | 54 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,405 | comment | def comment(self):
# type: () -> Any
return getattr(self, '_comment', None) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 57 | 59 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,406 | move_comment | def move_comment(self, target, empty=False):
# type: (Any, bool) -> Any
"""move a comment from this token to target (normally next token)
used to combine e.g. comments before a BlockEntryToken to the
ScalarToken that follows it
empty is a special for empty values -> comment after... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 61 | 89 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,407 | split_comment | def split_comment(self):
# type: () -> Any
""" split the post part of a comment, and return it
as comment to be added. Delete second part if [None, None]
abc: # this goes to sequence
# this goes to first element
- first element
"""
comment = self.c... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 91 | 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,408 | __init__ | def __init__(self, name, value, start_mark, end_mark):
# type: (Any, Any, Any, Any) -> None
Token.__init__(self, start_mark, end_mark)
self.name = name
self.value = value | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 116 | 120 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,409 | __init__ | def __init__(self, start_mark=None, end_mark=None, encoding=None):
# type: (Any, Any, Any) -> None
Token.__init__(self, start_mark, end_mark)
self.encoding = encoding | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 137 | 140 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,410 | __init__ | def __init__(self, value, start_mark, end_mark):
# type: (Any, Any, Any) -> None
Token.__init__(self, start_mark, end_mark)
self.value = value | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 211 | 214 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,411 | __init__ | def __init__(self, value, start_mark, end_mark):
# type: (Any, Any, Any) -> None
Token.__init__(self, start_mark, end_mark)
self.value = value | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 221 | 224 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,412 | __init__ | def __init__(self, value, start_mark, end_mark):
# type: (Any, Any, Any) -> None
Token.__init__(self, start_mark, end_mark)
self.value = value | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 231 | 234 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,413 | __init__ | def __init__(self, value, plain, start_mark, end_mark, style=None):
# type: (Any, Any, Any, Any, Any) -> None
Token.__init__(self, start_mark, end_mark)
self.value = value
self.plain = plain
self.style = style | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 241 | 246 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,414 | __init__ | def __init__(self, value, start_mark, end_mark):
# type: (Any, Any, Any) -> None
Token.__init__(self, start_mark, end_mark)
self.value = value | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 253 | 256 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,415 | reset | def reset(self):
# type: () -> None
if hasattr(self, 'pre_done'):
delattr(self, 'pre_done') | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 258 | 261 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,416 | __repr__ | def __repr__(self):
# type: () -> Any
v = '{!r}'.format(self.value)
if SHOWLINES:
try:
v += ', line: ' + str(self.start_mark.line)
v += ', col: ' + str(self.start_mark.column)
except: # NOQA
pass
return 'CommentToke... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 263 | 272 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,417 | __eq__ | def __eq__(self, other):
# type: (Any) -> bool
if self.start_mark != other.start_mark:
return False
if self.end_mark != other.end_mark:
return False
if self.value != other.value:
return False
return True | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/tokens.py | 274 | 282 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,418 | __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/tokens.py | 284 | 286 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,419 | __init__ | def __init__(
self,
stream,
default_style=None,
default_flow_style=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None,
encoding=None,
explicit_start=None,
explicit_end=None,
version=No... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/dumper.py | 23 | 69 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,420 | __init__ | def __init__(
self,
stream,
default_style=None,
default_flow_style=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None,
encoding=None,
explicit_start=None,
explicit_end=None,
version=No... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/dumper.py | 73 | 119 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,421 | __init__ | def __init__(
self,
stream,
default_style=None,
default_flow_style=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None,
encoding=None,
explicit_start=None,
explicit_end=None,
version=No... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/dumper.py | 123 | 169 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,422 | __init__ | def __init__(
self,
stream,
default_style=None,
default_flow_style=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None,
encoding=None,
explicit_start=None,
explicit_end=None,
version=No... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/dumper.py | 173 | 221 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,423 | __init__ | def __init__(self, stream, version=None, preserve_quotes=None):
# type: (StreamTextType, Optional[VersionType], Optional[bool]) -> None
CParser.__init__(self, stream)
self._parser = self._composer = self
BaseConstructor.__init__(self, loader=self)
BaseResolver.__init__(self, load... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/cyaml.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,424 | __init__ | def __init__(self, stream, version=None, preserve_quotes=None):
# type: (StreamTextType, Optional[VersionType], Optional[bool]) -> None
CParser.__init__(self, stream)
self._parser = self._composer = self
SafeConstructor.__init__(self, loader=self)
Resolver.__init__(self, loadumpe... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/cyaml.py | 42 | 50 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,425 | __init__ | def __init__(self, stream, version=None, preserve_quotes=None):
# type: (StreamTextType, Optional[VersionType], Optional[bool]) -> None
CParser.__init__(self, stream)
self._parser = self._composer = self
Constructor.__init__(self, loader=self)
Resolver.__init__(self, loadumper=se... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/cyaml.py | 54 | 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,426 | __init__ | def __init__(
self,
stream,
default_style=None,
default_flow_style=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None,
encoding=None,
explicit_start=None,
explicit_end=None,
version=No... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/cyaml.py | 66 | 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,427 | __init__ | def __init__(
self,
stream,
default_style=None,
default_flow_style=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None,
encoding=None,
explicit_start=None,
explicit_end=None,
version=No... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/cyaml.py | 111 | 150 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,428 | __init__ | def __init__(
self,
stream,
default_style=None,
default_flow_style=None,
canonical=None,
indent=None,
width=None,
allow_unicode=None,
line_break=None,
encoding=None,
explicit_start=None,
explicit_end=None,
version=No... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/cyaml.py | 154 | 192 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,429 | __init__ | def __init__(self, loader):
# type: (Any) -> None
self.loader = loader
if self.loader is not None and getattr(self.loader, "_parser", None) is None:
self.loader._parser = self
self.reset_parser() | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 101 | 106 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,430 | reset_parser | def reset_parser(self):
# type: () -> None
# Reset the state attributes (to clear self-references)
self.current_event = None
self.tag_handles = {} # type: Dict[Any, Any]
self.states = [] # type: List[Any]
self.marks = [] # type: List[Any]
self.state = self.pars... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 108 | 115 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,431 | dispose | def dispose(self):
# type: () -> None
self.reset_parser() | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 117 | 119 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,432 | scanner | def scanner(self):
# type: () -> Any
if hasattr(self.loader, "typ"):
return self.loader.scanner
return self.loader._scanner | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 122 | 126 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,433 | 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/parser.py | 129 | 133 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,434 | check_event | def check_event(self, *choices):
# type: (Any) -> bool
# Check the type of the next event.
if self.current_event is None:
if self.state:
self.current_event = self.state()
if self.current_event is not None:
if not choices:
return Tru... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 135 | 147 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,435 | peek_event | def peek_event(self):
# type: () -> Any
# Get the next event.
if self.current_event is None:
if self.state:
self.current_event = self.state()
return self.current_event | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 149 | 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,436 | get_event | def get_event(self):
# type: () -> Any
# Get the next event and proceed further.
if self.current_event is None:
if self.state:
self.current_event = self.state()
value = self.current_event
self.current_event = None
return value | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 157 | 165 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,437 | parse_stream_start | def parse_stream_start(self):
# type: () -> Any
# Parse the stream start.
token = self.scanner.get_token()
token.move_comment(self.scanner.peek_token())
event = StreamStartEvent(
token.start_mark, token.end_mark, encoding=token.encoding
)
# Prepare th... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 172 | 184 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,438 | parse_implicit_document_start | def parse_implicit_document_start(self):
# type: () -> Any
# Parse an implicit document.
if not self.scanner.check_token(
DirectiveToken, DocumentStartToken, StreamEndToken
):
self.tag_handles = self.DEFAULT_TAGS
token = self.scanner.peek_token()
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 186 | 204 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,439 | parse_document_start | def parse_document_start(self):
# type: () -> Any
# Parse any extra document end indicators.
while self.scanner.check_token(DocumentEndToken):
self.scanner.get_token()
# Parse an explicit document.
if not self.scanner.check_token(StreamEndToken):
token = s... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 206 | 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,440 | parse_document_end | def parse_document_end(self):
# type: () -> Any
# Parse the document end.
token = self.scanner.peek_token()
start_mark = end_mark = token.start_mark
explicit = False
if self.scanner.check_token(DocumentEndToken):
token = self.scanner.get_token()
en... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 245 | 263 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,441 | parse_document_content | def parse_document_content(self):
# type: () -> Any
if self.scanner.check_token(
DirectiveToken, DocumentStartToken, DocumentEndToken, StreamEndToken
):
event = self.process_empty_scalar(self.scanner.peek_token().start_mark)
self.state = self.states.pop()
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 265 | 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,442 | process_directives | def process_directives(self):
# type: () -> Any
yaml_version = None
self.tag_handles = {}
while self.scanner.check_token(DirectiveToken):
token = self.scanner.get_token()
if token.name == u"YAML":
if yaml_version is not None:
ra... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 276 | 319 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,443 | parse_block_node | def parse_block_node(self):
# type: () -> Any
return self.parse_node(block=True) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 337 | 339 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,444 | parse_flow_node | def parse_flow_node(self):
# type: () -> Any
return self.parse_node() | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 341 | 343 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,445 | parse_block_node_or_indentless_sequence | def parse_block_node_or_indentless_sequence(self):
# type: () -> Any
return self.parse_node(block=True, indentless_sequence=True) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 345 | 347 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,446 | transform_tag | def transform_tag(self, handle, suffix):
# type: (Any, Any) -> Any
return self.tag_handles[handle] + suffix | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 349 | 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,447 | parse_node | def parse_node(self, block=False, indentless_sequence=False):
# type: (bool, bool) -> Any
if self.scanner.check_token(AliasToken):
token = self.scanner.get_token()
event = AliasEvent(
token.value, token.start_mark, token.end_mark
) # type: Any
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 353 | 527 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,448 | parse_block_sequence_first_entry | def parse_block_sequence_first_entry(self):
# type: () -> Any
token = self.scanner.get_token()
# move any comment from start token
# token.move_comment(self.scanner.peek_token())
self.marks.append(token.start_mark)
return self.parse_block_sequence_entry() | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 532 | 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,449 | parse_block_sequence_entry | def parse_block_sequence_entry(self):
# type: () -> Any
if self.scanner.check_token(BlockEntryToken):
token = self.scanner.get_token()
token.move_comment(self.scanner.peek_token())
if not self.scanner.check_token(BlockEntryToken, BlockEndToken):
self.s... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 540 | 565 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,450 | parse_indentless_sequence_entry | def parse_indentless_sequence_entry(self):
# type: () -> Any
if self.scanner.check_token(BlockEntryToken):
token = self.scanner.get_token()
token.move_comment(self.scanner.peek_token())
if not self.scanner.check_token(
BlockEntryToken, KeyToken, ValueT... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 574 | 592 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,451 | parse_block_mapping_first_key | def parse_block_mapping_first_key(self):
# type: () -> Any
token = self.scanner.get_token()
self.marks.append(token.start_mark)
return self.parse_block_mapping_key() | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 599 | 603 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,452 | parse_block_mapping_key | def parse_block_mapping_key(self):
# type: () -> Any
if self.scanner.check_token(KeyToken):
token = self.scanner.get_token()
token.move_comment(self.scanner.peek_token())
if not self.scanner.check_token(KeyToken, ValueToken, BlockEndToken):
self.states... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 605 | 634 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,453 | parse_block_mapping_value | def parse_block_mapping_value(self):
# type: () -> Any
if self.scanner.check_token(ValueToken):
token = self.scanner.get_token()
# value token might have post comment move it to e.g. block
if self.scanner.check_token(ValueToken):
token.move_comment(sel... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 636 | 663 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,454 | parse_flow_sequence_first_entry | def parse_flow_sequence_first_entry(self):
# type: () -> Any
token = self.scanner.get_token()
self.marks.append(token.start_mark)
return self.parse_flow_sequence_entry(first=True) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 676 | 680 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,455 | parse_flow_sequence_entry | def parse_flow_sequence_entry(self, first=False):
# type: (bool) -> Any
if not self.scanner.check_token(FlowSequenceEndToken):
if not first:
if self.scanner.check_token(FlowEntryToken):
self.scanner.get_token()
else:
tok... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 682 | 713 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,456 | parse_flow_sequence_entry_mapping_key | def parse_flow_sequence_entry_mapping_key(self):
# type: () -> Any
token = self.scanner.get_token()
if not self.scanner.check_token(
ValueToken, FlowEntryToken, FlowSequenceEndToken
):
self.states.append(self.parse_flow_sequence_entry_mapping_value)
re... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 715 | 725 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,457 | parse_flow_sequence_entry_mapping_value | def parse_flow_sequence_entry_mapping_value(self):
# type: () -> Any
if self.scanner.check_token(ValueToken):
token = self.scanner.get_token()
if not self.scanner.check_token(FlowEntryToken, FlowSequenceEndToken):
self.states.append(self.parse_flow_sequence_entry_... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 727 | 740 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,458 | parse_flow_sequence_entry_mapping_end | def parse_flow_sequence_entry_mapping_end(self):
# type: () -> Any
self.state = self.parse_flow_sequence_entry
token = self.scanner.peek_token()
return MappingEndEvent(token.start_mark, token.start_mark) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 742 | 746 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,459 | parse_flow_mapping_first_key | def parse_flow_mapping_first_key(self):
# type: () -> Any
token = self.scanner.get_token()
self.marks.append(token.start_mark)
return self.parse_flow_mapping_key(first=True) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 754 | 758 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,460 | parse_flow_mapping_key | def parse_flow_mapping_key(self, first=False):
# type: (Any) -> Any
if not self.scanner.check_token(FlowMappingEndToken):
if not first:
if self.scanner.check_token(FlowEntryToken):
self.scanner.get_token()
else:
token = ... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 760 | 796 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,461 | parse_flow_mapping_value | def parse_flow_mapping_value(self):
# type: () -> Any
if self.scanner.check_token(ValueToken):
token = self.scanner.get_token()
if not self.scanner.check_token(FlowEntryToken, FlowMappingEndToken):
self.states.append(self.parse_flow_mapping_key)
re... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 798 | 811 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,462 | parse_flow_mapping_empty_value | def parse_flow_mapping_empty_value(self):
# type: () -> Any
self.state = self.parse_flow_mapping_key
return self.process_empty_scalar(self.scanner.peek_token().start_mark) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 813 | 816 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,463 | process_empty_scalar | def process_empty_scalar(self, mark, comment=None):
# type: (Any, Any) -> Any
return ScalarEvent(None, None, (True, False), "", mark, mark, comment=comment) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 818 | 820 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,464 | transform_tag | def transform_tag(self, handle, suffix):
# type: (Any, Any) -> Any
# return self.tag_handles[handle]+suffix
if handle == "!!" and suffix in (
u"null",
u"bool",
u"int",
u"float",
u"binary",
u"timestamp",
u"omap",
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/parser.py | 826 | 844 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,465 | __init__ | def __init__(self, name, position, character, encoding, reason):
# type: (Any, Any, Any, Any, Any) -> None
self.name = name
self.character = character
self.position = position
self.encoding = encoding
self.reason = reason | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 38 | 44 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,466 | __str__ | def __str__(self):
# type: () -> str
if isinstance(self.character, binary_type):
return (
"'%s' codec can't decode byte #x%02x: %s\n"
' in "%s", position %d'
% (
self.encoding,
ord(self.character),
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 46 | 66 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,467 | __init__ | def __init__(self, stream, loader=None):
# type: (Any, Any) -> None
self.loader = loader
if self.loader is not None and getattr(self.loader, "_reader", None) is None:
self.loader._reader = self
self.reset_reader()
self.stream = stream # type: Any # as .read is calle... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 83 | 89 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,468 | reset_reader | def reset_reader(self):
# type: () -> None
self.name = None # type: Any
self.stream_pointer = 0
self.eof = True
self.buffer = ""
self.pointer = 0
self.raw_buffer = None # type: Any
self.raw_decode = None
self.encoding = None # type: Optional[Tex... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 91 | 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,469 | stream | def stream(self):
# type: () -> Any
try:
return self._stream
except AttributeError:
raise YAMLStreamError("input stream needs to specified") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 106 | 111 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,470 | stream | def stream(self, val):
# type: (Any) -> None
if val is None:
return
self._stream = None
if isinstance(val, text_type):
self.name = "<unicode string>"
self.check_printable(val)
self.buffer = val + u"\0" # type: ignore
elif isinstanc... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 114 | 134 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,471 | peek | def peek(self, index=0):
# type: (int) -> Text
try:
return self.buffer[self.pointer + index]
except IndexError:
self.update(index + 1)
return self.buffer[self.pointer + index] | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 136 | 142 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,472 | prefix | def prefix(self, length=1):
# type: (int) -> Any
if self.pointer + length >= len(self.buffer):
self.update(length)
return self.buffer[self.pointer : self.pointer + length] | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 144 | 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,473 | forward_1_1 | def forward_1_1(self, length=1):
# type: (int) -> None
if self.pointer + length + 1 >= len(self.buffer):
self.update(length + 1)
while length != 0:
ch = self.buffer[self.pointer]
self.pointer += 1
self.index += 1
if ch in u"\n\x85\u2028... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 150 | 165 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,474 | forward | def forward(self, length=1):
# type: (int) -> None
if self.pointer + length + 1 >= len(self.buffer):
self.update(length + 1)
while length != 0:
ch = self.buffer[self.pointer]
self.pointer += 1
self.index += 1
if ch == u"\n" or (ch == u"... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 167 | 180 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,475 | get_mark | def get_mark(self):
# type: () -> Any
if self.stream is None:
return StringMark(
self.name, self.index, self.line, self.column, self.buffer, self.pointer
)
else:
return FileMark(self.name, self.index, self.line, self.column) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 182 | 189 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,476 | determine_encoding | def determine_encoding(self):
# type: () -> None
while not self.eof and (self.raw_buffer is None or len(self.raw_buffer) < 2):
self.update_raw()
if isinstance(self.raw_buffer, binary_type):
if self.raw_buffer.startswith(codecs.BOM_UTF16_LE):
self.raw_decod... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 191 | 205 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,477 | _get_non_printable_ascii | def _get_non_printable_ascii(cls, data): # type: ignore
# type: (Text, bytes) -> Optional[Tuple[int, Text]]
ascii_bytes = data.encode("ascii")
non_printables = ascii_bytes.translate(
None, cls._printable_ascii
) # type: ignore
if not non_printables:
retu... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 225 | 234 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,478 | _get_non_printable_regex | def _get_non_printable_regex(cls, data):
# type: (Text) -> Optional[Tuple[int, Text]]
match = cls.NON_PRINTABLE.search(data)
if not bool(match):
return None
return match.start(), match.group() | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 237 | 242 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,479 | _get_non_printable | def _get_non_printable(cls, data):
# type: (Text) -> Optional[Tuple[int, Text]]
try:
return cls._get_non_printable_ascii(data) # type: ignore
except UnicodeEncodeError:
return cls._get_non_printable_regex(data) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 245 | 250 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,480 | check_printable | def check_printable(self, data):
# type: (Any) -> None
non_printable_match = self._get_non_printable(data)
if non_printable_match is not None:
start, character = non_printable_match
position = self.index + (len(self.buffer) - self.pointer) + start
raise Reader... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 252 | 264 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,481 | update | def update(self, length):
# type: (int) -> None
if self.raw_buffer is None:
return
self.buffer = self.buffer[self.pointer :]
self.pointer = 0
while len(self.buffer) < length:
if not self.eof:
self.update_raw()
if self.raw_decode... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 266 | 307 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,482 | update_raw | def update_raw(self, size=None):
# type: (Optional[int]) -> None
if size is None:
size = 4096 if PY3 else 1024
data = self.stream.read(size)
if self.raw_buffer is None:
self.raw_buffer = data
else:
self.raw_buffer += data
self.stream_po... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/reader.py | 309 | 320 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,483 | __new__ | def __new__(cls, *args, **kw):
# type: (Any, Any) -> Any
anchor = kw.pop("anchor", None) # type: ignore
ret_val = text_type.__new__(cls, *args, **kw) # type: ignore
if anchor is not None:
ret_val.yaml_set_anchor(anchor, always_dump=True)
return ret_val | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarstring.py | 27 | 33 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,484 | replace | def replace(self, old, new, maxreplace=-1):
# type: (Any, Any, int) -> Any
return type(self)((text_type.replace(self, old, new, maxreplace))) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarstring.py | 35 | 37 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,485 | anchor | def anchor(self):
# type: () -> Any
if not hasattr(self, Anchor.attrib):
setattr(self, Anchor.attrib, Anchor())
return getattr(self, Anchor.attrib) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarstring.py | 40 | 44 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,486 | yaml_anchor | def yaml_anchor(self, any=False):
# type: (bool) -> Any
if not hasattr(self, Anchor.attrib):
return None
if any or self.anchor.always_dump:
return self.anchor
return None | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarstring.py | 46 | 52 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,487 | yaml_set_anchor | def yaml_set_anchor(self, value, always_dump=False):
# type: (Any, bool) -> None
self.anchor.value = value
self.anchor.always_dump = always_dump | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarstring.py | 54 | 57 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,488 | __new__ | def __new__(cls, value, anchor=None):
# type: (Text, Any) -> Any
return ScalarString.__new__(cls, value, anchor=anchor) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarstring.py | 65 | 67 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,489 | __new__ | def __new__(cls, value, anchor=None):
# type: (Text, Any) -> Any
return ScalarString.__new__(cls, value, anchor=anchor) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarstring.py | 78 | 80 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,490 | __new__ | def __new__(cls, value, anchor=None):
# type: (Text, Any) -> Any
return ScalarString.__new__(cls, value, anchor=anchor) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarstring.py | 88 | 90 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,491 | __new__ | def __new__(cls, value, anchor=None):
# type: (Text, Any) -> Any
return ScalarString.__new__(cls, value, anchor=anchor) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarstring.py | 98 | 100 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,492 | __new__ | def __new__(cls, value, anchor=None):
# type: (Text, Any) -> Any
return ScalarString.__new__(cls, value, anchor=anchor) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarstring.py | 108 | 110 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,493 | preserve_literal | def preserve_literal(s):
# type: (Text) -> Text
return LiteralScalarString(s.replace("\r\n", "\n").replace("\r", "\n")) | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarstring.py | 113 | 115 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,494 | walk_tree | def walk_tree(base, map=None):
# type: (Any, Any) -> None
"""
the routine here walks over a simple yaml tree (recursing in
dict values and list items) and converts strings that
have multiple lines to literal scalars
You can also provide an explicit (ordered) mapping for multiple transforms
... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scalarstring.py | 118 | 156 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,495 | __init__ | def __init__(self, stream, version=None, preserve_quotes=None):
# type: (StreamTextType, Optional[VersionType], Optional[bool]) -> None
Reader.__init__(self, stream, loader=self)
Scanner.__init__(self, loader=self)
Parser.__init__(self, loader=self)
Composer.__init__(self, loader... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/loader.py | 26 | 33 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,496 | __init__ | def __init__(self, stream, version=None, preserve_quotes=None):
# type: (StreamTextType, Optional[VersionType], Optional[bool]) -> None
Reader.__init__(self, stream, loader=self)
Scanner.__init__(self, loader=self)
Parser.__init__(self, loader=self)
Composer.__init__(self, loader... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/loader.py | 37 | 44 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,497 | __init__ | def __init__(self, stream, version=None, preserve_quotes=None):
raise ValueError("Unsafe loader not implemented in this library.") | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/loader.py | 48 | 49 | {
"name": "PortablePy/3.10.8.0",
"url": "https://github.com/PortablePy/3.10.8.0.git",
"license": "NOASSERTION",
"stars": 0,
"forks": 0
} |
6,069,498 | __init__ | def __init__(self, stream, version=None, preserve_quotes=None):
# type: (StreamTextType, Optional[VersionType], Optional[bool]) -> None
# self.reader = Reader.__init__(self, stream)
Reader.__init__(self, stream, loader=self)
RoundTripScanner.__init__(self, loader=self)
RoundTripP... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/loader.py | 60 | 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,499 | __init__ | def __init__(self, loadumper=None):
# type: (Any, Any) -> None
self.loadumper = loadumper
if (
self.loadumper is not None
and getattr(self.loadumper, "_resolver", None) is None
):
self.loadumper._resolver = self.loadumper
self._loader_version =... | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/resolver.py | 115 | 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,500 | parser | def parser(self):
# type: () -> Any
if self.loadumper is not None:
if hasattr(self.loadumper, "typ"):
return self.loadumper.parser
return self.loadumper._parser
return None | python | python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/resolver.py | 128 | 134 | {
"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.