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,101
next_possible_simple_key
def next_possible_simple_key(self): # type: () -> Any # Return the number of the nearest possible simple key. Actually we # don't need to loop through the whole dictionary. We may replace it # with the following code: # if not self.possible_simple_keys: # return N...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
327
341
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,102
stale_possible_simple_keys
def stale_possible_simple_keys(self): # type: () -> None # Remove entries that are no longer possible simple keys. According to # the YAML specification, simple keys # - should be limited to a single line, # - should be no longer than 1024 characters. # Disabling this pro...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
343
361
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,103
save_possible_simple_key
def save_possible_simple_key(self): # type: () -> None # The next token may start a simple key. We check if it's possible # and save its position. This function is called for # ALIAS, ANCHOR, TAG, SCALAR(flow), '[', and '{'. # Check if a simple key is required at the current p...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
363
385
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,104
remove_possible_simple_key
def remove_possible_simple_key(self): # type: () -> None # Remove the saved possible key position at the current flow level. if self.flow_level in self.possible_simple_keys: key = self.possible_simple_keys[self.flow_level] if key.required: raise ScannerEr...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
387
401
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,105
unwind_indent
def unwind_indent(self, column): # type: (Any) -> None # In flow context, tokens should respect indentation. # Actually the condition should be `self.indent >= column` according to # the spec. But this condition will prohibit intuitively correct # constructions such as # ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
405
428
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,106
add_indent
def add_indent(self, column): # type: (int) -> bool # Check if we need to increase indentation. if self.indent < column: self.indents.append(self.indent) self.indent = column return True return False
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
430
437
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,107
fetch_stream_start
def fetch_stream_start(self): # type: () -> None # We always add STREAM-START as the first token and STREAM-END as the # last token. # Read the token. mark = self.reader.get_mark() # Add STREAM-START. self.tokens.append(StreamStartToken(mark, mark, encoding=self.r...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
441
448
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,108
fetch_stream_end
def fetch_stream_end(self): # type: () -> None # Set the current intendation to -1. self.unwind_indent(-1) # Reset simple keys. self.remove_possible_simple_key() self.allow_simple_key = False self.possible_simple_keys = {} # Read the token. mark = ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
450
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,109
fetch_directive
def fetch_directive(self): # type: () -> None # Set the current intendation to -1. self.unwind_indent(-1) # Reset simple keys. self.remove_possible_simple_key() self.allow_simple_key = False # Scan and add DIRECTIVE. self.tokens.append(self.scan_directiv...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
465
475
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,110
fetch_document_start
def fetch_document_start(self): # type: () -> None self.fetch_document_indicator(DocumentStartToken)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
477
479
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,111
fetch_document_end
def fetch_document_end(self): # type: () -> None self.fetch_document_indicator(DocumentEndToken)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
481
483
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,112
fetch_document_indicator
def fetch_document_indicator(self, TokenClass): # type: (Any) -> None # Set the current intendation to -1. self.unwind_indent(-1) # Reset simple keys. Note that there could not be a block collection # after '---'. self.remove_possible_simple_key() self.allow_simp...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
485
499
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,113
fetch_flow_sequence_start
def fetch_flow_sequence_start(self): # type: () -> None self.fetch_flow_collection_start(FlowSequenceStartToken, to_push="[")
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
501
503
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,114
fetch_flow_mapping_start
def fetch_flow_mapping_start(self): # type: () -> None self.fetch_flow_collection_start(FlowMappingStartToken, to_push="{")
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
505
507
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,115
fetch_flow_collection_start
def fetch_flow_collection_start(self, TokenClass, to_push): # type: (Any, Text) -> None # '[' and '{' may start a simple key. self.save_possible_simple_key() # Increase the flow level. self.flow_context.append(to_push) # Simple keys are allowed after '[' and '{'. ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
509
521
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,116
fetch_flow_sequence_end
def fetch_flow_sequence_end(self): # type: () -> None self.fetch_flow_collection_end(FlowSequenceEndToken)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
523
525
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,117
fetch_flow_mapping_end
def fetch_flow_mapping_end(self): # type: () -> None self.fetch_flow_collection_end(FlowMappingEndToken)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
527
529
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,118
fetch_flow_collection_end
def fetch_flow_collection_end(self, TokenClass): # type: (Any) -> None # Reset possible simple key on the current level. self.remove_possible_simple_key() # Decrease the flow level. try: popped = self.flow_context.pop() # NOQA except IndexError: #...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
531
548
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,119
fetch_flow_entry
def fetch_flow_entry(self): # type: () -> None # Simple keys are allowed after ','. self.allow_simple_key = True # Reset possible simple key on the current level. self.remove_possible_simple_key() # Add FLOW-ENTRY. start_mark = self.reader.get_mark() self....
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
550
560
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,120
fetch_block_entry
def fetch_block_entry(self): # type: () -> None # Block context needs additional checks. if not self.flow_level: # Are we allowed to start a new entry? if not self.allow_simple_key: raise ScannerError( None, None, ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
562
591
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,121
fetch_key
def fetch_key(self): # type: () -> None # Block context needs additional checks. if not self.flow_level: # Are we allowed to start a key (not nessesary a simple)? if not self.allow_simple_key: raise ScannerError( None, ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
593
622
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,122
fetch_value
def fetch_value(self): # type: () -> None # Do we determine a simple key? if self.flow_level in self.possible_simple_keys: # Add KEY. key = self.possible_simple_keys[self.flow_level] del self.possible_simple_keys[self.flow_level] self.tokens.insert...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
624
683
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,123
fetch_alias
def fetch_alias(self): # type: () -> None # ALIAS could be a simple key. self.save_possible_simple_key() # No simple keys after ALIAS. self.allow_simple_key = False # Scan and add ALIAS. self.tokens.append(self.scan_anchor(AliasToken))
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
685
692
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,124
fetch_anchor
def fetch_anchor(self): # type: () -> None # ANCHOR could start a simple key. self.save_possible_simple_key() # No simple keys after ANCHOR. self.allow_simple_key = False # Scan and add ANCHOR. self.tokens.append(self.scan_anchor(AnchorToken))
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
694
701
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,125
fetch_tag
def fetch_tag(self): # type: () -> None # TAG could start a simple key. self.save_possible_simple_key() # No simple keys after TAG. self.allow_simple_key = False # Scan and add TAG. self.tokens.append(self.scan_tag())
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
703
710
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,126
fetch_literal
def fetch_literal(self): # type: () -> None self.fetch_block_scalar(style="|")
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
712
714
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,127
fetch_folded
def fetch_folded(self): # type: () -> None self.fetch_block_scalar(style=">")
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
716
718
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,128
fetch_block_scalar
def fetch_block_scalar(self, style): # type: (Any) -> None # A simple key may follow a block scalar. self.allow_simple_key = True # Reset possible simple key on the current level. self.remove_possible_simple_key() # Scan and add SCALAR. self.tokens.append(self.sca...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
720
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,129
fetch_single
def fetch_single(self): # type: () -> None self.fetch_flow_scalar(style="'")
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
729
731
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,130
fetch_double
def fetch_double(self): # type: () -> None self.fetch_flow_scalar(style='"')
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
733
735
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,131
fetch_flow_scalar
def fetch_flow_scalar(self, style): # type: (Any) -> None # A flow scalar could be a simple key. self.save_possible_simple_key() # No simple keys after flow scalars. self.allow_simple_key = False # Scan and add SCALAR. self.tokens.append(self.scan_flow_scalar(styl...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
737
744
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,132
fetch_plain
def fetch_plain(self): # type: () -> None # A plain scalar could be a simple key. self.save_possible_simple_key() # No simple keys after plain scalars. But note that `scan_plain` will # change this flag if the scan is finished at the beginning of the # line. self....
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
746
755
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,133
check_directive
def check_directive(self): # type: () -> Any # DIRECTIVE: ^ '%' ... # The '%' indicator is already checked. if self.reader.column == 0: return True return None
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
759
765
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,134
check_document_start
def check_document_start(self): # type: () -> Any # DOCUMENT-START: ^ '---' (' '|'\n') if self.reader.column == 0: if ( self.reader.prefix(3) == "---" and self.reader.peek(3) in _THE_END_SPACE_TAB ): return True re...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
767
776
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,135
check_document_end
def check_document_end(self): # type: () -> Any # DOCUMENT-END: ^ '...' (' '|'\n') if self.reader.column == 0: if ( self.reader.prefix(3) == "..." and self.reader.peek(3) in _THE_END_SPACE_TAB ): return True retu...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
778
787
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,136
check_block_entry
def check_block_entry(self): # type: () -> Any # BLOCK-ENTRY: '-' (' '|'\n') return self.reader.peek(1) in _THE_END_SPACE_TAB
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
789
792
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,137
check_key
def check_key(self): # type: () -> Any # KEY(flow context): '?' if bool(self.flow_level): return True # KEY(block context): '?' (' '|'\n') return self.reader.peek(1) in _THE_END_SPACE_TAB
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
794
800
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,138
check_value
def check_value(self): # type: () -> Any # VALUE(flow context): ':' if self.scanner_processing_version == (1, 1): if bool(self.flow_level): return True else: if bool(self.flow_level): if self.flow_context[-1] == "[": ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
802
819
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,139
check_plain
def check_plain(self): # type: () -> Any # A plain scalar may start with any non-space character except: # '-', '?', ':', ',', '[', ']', '{', '}', # '#', '&', '*', '!', '|', '>', '\'', '\"', # '%', '@', '`'. # # It may also start with # '-', '?', '...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
821
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,140
scan_to_next_token
def scan_to_next_token(self): # type: () -> Any # We ignore spaces, line breaks and comments. # If we find a line break in the block context, we set the flag # `allow_simple_key` on. # The byte order mark is stripped if it's the first character in the # stream. We do not ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
858
895
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,141
scan_directive
def scan_directive(self): # type: () -> Any # See the specification for details. srp = self.reader.peek srf = self.reader.forward start_mark = self.reader.get_mark() srf() name = self.scan_directive_name(start_mark) value = None if name == "YAML": ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
897
917
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,142
scan_directive_name
def scan_directive_name(self, start_mark): # type: (Any) -> Any # See the specification for details. length = 0 srp = self.reader.peek ch = srp(length) while "0" <= ch <= "9" or "A" <= ch <= "Z" or "a" <= ch <= "z" or ch in "-_:.": length += 1 ch =...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
919
945
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,143
scan_yaml_directive_value
def scan_yaml_directive_value(self, start_mark): # type: (Any) -> Any # See the specification for details. srp = self.reader.peek srf = self.reader.forward while srp() == " ": srf() major = self.scan_yaml_directive_number(start_mark) if srp() != ".": ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
947
972
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,144
scan_yaml_directive_number
def scan_yaml_directive_number(self, start_mark): # type: (Any) -> Any # See the specification for details. srp = self.reader.peek srf = self.reader.forward ch = srp() if not ("0" <= ch <= "9"): raise ScannerError( "while scanning a directive",...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
974
992
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,145
scan_tag_directive_value
def scan_tag_directive_value(self, start_mark): # type: (Any) -> Any # See the specification for details. srp = self.reader.peek srf = self.reader.forward while srp() == " ": srf() handle = self.scan_tag_directive_handle(start_mark) while srp() == " ":...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
994
1,005
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,146
scan_tag_directive_handle
def scan_tag_directive_handle(self, start_mark): # type: (Any) -> Any # See the specification for details. value = self.scan_tag_handle("directive", start_mark) ch = self.reader.peek() if ch != " ": raise ScannerError( "while scanning a directive", ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,007
1,019
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,147
scan_tag_directive_prefix
def scan_tag_directive_prefix(self, start_mark): # type: (Any) -> Any # See the specification for details. value = self.scan_tag_uri("directive", start_mark) ch = self.reader.peek() if ch not in "\0 \r\n\x85\u2028\u2029": raise ScannerError( "while sca...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,021
1,033
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,148
scan_directive_ignored_line
def scan_directive_ignored_line(self, start_mark): # type: (Any) -> None # See the specification for details. srp = self.reader.peek srf = self.reader.forward while srp() == " ": srf() if srp() == "#": while srp() not in _THE_END: s...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,035
1,053
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,149
scan_anchor
def scan_anchor(self, TokenClass): # type: (Any) -> Any # The specification does not restrict characters for anchors and # aliases. This may lead to problems, for instance, the document: # [ *alias, value ] # can be interpteted in two ways, as # [ "value" ] # ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,055
1,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,150
scan_tag
def scan_tag(self): # type: () -> Any # See the specification for details. srp = self.reader.peek start_mark = self.reader.get_mark() ch = srp(1) if ch == "<": handle = None self.reader.forward(2) suffix = self.scan_tag_uri("tag", start...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,102
1,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,151
scan_block_scalar
def scan_block_scalar(self, style, rt=False): # type: (Any, Optional[bool]) -> Any # See the specification for details. srp = self.reader.peek if style == ">": folded = True else: folded = False chunks = [] # type: List[Any] start_mark = ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,152
1,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,152
scan_block_scalar_indicators
def scan_block_scalar_indicators(self, start_mark): # type: (Any) -> Any # See the specification for details. srp = self.reader.peek chomping = None increment = None ch = srp() if ch in "+-": if ch == "+": chomping = True el...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,271
1,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,153
scan_block_scalar_ignored_line
def scan_block_scalar_ignored_line(self, start_mark): # type: (Any) -> Any # See the specification for details. srp = self.reader.peek srf = self.reader.forward prefix = "" comment = None while srp() == " ": prefix += srp() srf() if...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,323
1,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,154
scan_block_scalar_indentation
def scan_block_scalar_indentation(self): # type: () -> Any # See the specification for details. srp = self.reader.peek srf = self.reader.forward chunks = [] max_indent = 0 end_mark = self.reader.get_mark() while srp() in " \r\n\x85\u2028\u2029": ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,349
1,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,155
scan_block_scalar_breaks
def scan_block_scalar_breaks(self, indent): # type: (int) -> Any # See the specification for details. chunks = [] srp = self.reader.peek srf = self.reader.forward end_mark = self.reader.get_mark() while self.reader.column < indent and srp() == " ": srf...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,367
1,381
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,156
scan_flow_scalar
def scan_flow_scalar(self, style): # type: (Any) -> Any # See the specification for details. # Note that we loose indentation rules for quoted scalars. Quoted # scalars don't need to adhere indentation because " and ' clearly # mark the beginning and the end of them. Therefore we...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,383
1,406
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,157
scan_flow_scalar_non_spaces
def scan_flow_scalar_non_spaces(self, double, start_mark): # type: (Any, Any) -> Any # See the specification for details. chunks = [] # type: List[Any] srp = self.reader.peek srf = self.reader.forward while True: length = 0 while srp(length) not i...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,431
1,483
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,158
scan_flow_scalar_spaces
def scan_flow_scalar_spaces(self, double, start_mark): # type: (Any, Any) -> Any # See the specification for details. srp = self.reader.peek chunks = [] length = 0 while srp(length) in " \t": length += 1 whitespaces = self.reader.prefix(length) ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,485
1,513
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,159
scan_flow_scalar_breaks
def scan_flow_scalar_breaks(self, double, start_mark): # type: (Any, Any) -> Any # See the specification for details. chunks = [] # type: List[Any] srp = self.reader.peek srf = self.reader.forward while True: # Instead of checking indentation, we check for do...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,515
1,537
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,160
scan_plain
def scan_plain(self): # type: () -> Any # See the specification for details. # We add an additional restriction for the flow context: # plain scalars in the flow context cannot contain ',', ': ' and '?'. # We also keep track of the `allow_simple_key` flag here. # Inden...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,539
1,614
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,161
scan_plain_spaces
def scan_plain_spaces(self, indent, start_mark): # type: (Any, Any) -> Any # See the specification for details. # The specification is really confusing about tabs in plain scalars. # We just forbid them completely. Do not use tabs in YAML! srp = self.reader.peek srf = sel...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,616
1,654
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,162
scan_tag_handle
def scan_tag_handle(self, name, start_mark): # type: (Any, Any) -> Any # See the specification for details. # For some strange reasons, the specification does not allow '_' in # tag handles. I have allowed it anyway. srp = self.reader.peek ch = srp() if ch != "!":...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,656
1,689
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,163
scan_tag_uri
def scan_tag_uri(self, name, start_mark): # type: (Any, Any) -> Any # See the specification for details. # Note: we do not check if URI is well-formed. srp = self.reader.peek chunks = [] length = 0 ch = srp(length) while ( "0" <= ch <= "9" ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,691
1,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,164
scan_uri_escapes
def scan_uri_escapes(self, name, start_mark): # type: (Any, Any) -> Any # See the specification for details. srp = self.reader.peek srf = self.reader.forward code_bytes = [] # type: List[Any] mark = self.reader.get_mark() while srp() == "%": srf() ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,727
1,759
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,165
scan_line_break
def scan_line_break(self): # type: () -> Any # Transforms: # '\r\n' : '\n' # '\r' : '\n' # '\n' : '\n' # '\x85' : '\n' # '\u2028' : '\u2028' # '\u2029 : '\u2029' # default : '' ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,761
1,781
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,166
check_token
def check_token(self, *choices): # type: (Any) -> bool # Check if the next token is one of the given types. while self.need_more_tokens(): self.fetch_more_tokens() self._gather_comments() if bool(self.tokens): if not choices: return True ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,785
1,797
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,167
peek_token
def peek_token(self): # type: () -> Any # Return the next token, but do not delete if from the queue. while self.need_more_tokens(): self.fetch_more_tokens() self._gather_comments() if bool(self.tokens): return self.tokens[0] return None
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,799
1,807
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,168
_gather_comments
def _gather_comments(self): # type: () -> Any """combine multiple comment lines""" comments = [] # type: List[Any] if not self.tokens: return comments if isinstance(self.tokens[0], CommentToken): comment = self.tokens.pop(0) self.tokens_taken ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,809
1,832
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,169
get_token
def get_token(self): # type: () -> Any # Return the next token. while self.need_more_tokens(): self.fetch_more_tokens() self._gather_comments() if bool(self.tokens): # nprint('tk', self.tokens) # only add post comment to single line tokens: ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,834
1,891
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,170
fetch_comment
def fetch_comment(self, comment): # type: (Any) -> None value, start_mark, end_mark = comment while value and value[-1] == " ": # empty line within indented key context # no need to update end-mark, that is not used value = value[:-1] self.tokens.appen...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,893
1,900
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,171
scan_to_next_token
def scan_to_next_token(self): # type: () -> Any # We ignore spaces, line breaks and comments. # If we find a line break in the block context, we set the flag # `allow_simple_key` on. # The byte order mark is stripped if it's the first character in the # stream. We do not ...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,904
1,975
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,172
scan_line_break
def scan_line_break(self, empty_line=False): # type: (bool) -> Text # Transforms: # '\r\n' : '\n' # '\r' : '\n' # '\n' : '\n' # '\x85' : '\n' # '\u2028' : '\u2028' # '\u2029 : '\u2029' # defa...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
1,977
2,000
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,173
scan_block_scalar
def scan_block_scalar(self, style, rt=True): # type: (Any, Optional[bool]) -> Any return Scanner.scan_block_scalar(self, style, rt=rt)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/scanner.py
2,002
2,004
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,174
insert
def insert(self, pos, key, value): # type: (int, Any, Any) -> None if pos >= len(self): self[key] = value return od = ordereddict() od.update(self) for k in od: del self[k] for index, old_key in enume...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
27
39
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,175
utf8
def utf8(s): # type: (str) -> str return s
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
48
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,176
to_str
def to_str(s): # type: (str) -> str return s
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.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,177
to_unicode
def to_unicode(s): # type: (str) -> str return s
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
56
58
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,178
utf8
def utf8(s): # type: (unicode) -> str return s.encode("utf-8")
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.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,179
to_str
def to_str(s): # type: (str) -> str return str(s)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
69
71
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,180
to_unicode
def to_unicode(s): # type: (str) -> unicode return unicode(s) # NOQA
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
73
75
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,181
with_metaclass
def with_metaclass(meta, *bases): # type: (Any, Any) -> Any """Create a base class with a metaclass.""" return meta("NewBase", bases, {})
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
135
138
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,182
__init__
def __init__(self): # type: () -> None self.map = {} # type: Dict[Any, Any]
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
158
160
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,183
__call__
def __call__(self, k): # type: (Any) -> None self.map[k] = self.map.get(k, 0) + 1
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
162
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,184
dump
def dump(self): # type: () -> None for k in sorted(self.map): sys.stdout.write("{} -> {}".format(k, self.map[k]))
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
166
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,185
dbg
def dbg(val=None): # type: (Any) -> Any global _debug if _debug is None: # set to true or false _debugx = os.environ.get("YAMLDEBUG") if _debugx is None: _debug = 0 else: _debug = int(_debugx) if val is None: return _debug return _debug...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
175
187
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,186
__init__
def __init__(self, file_name=None): # type: (Any) -> None self._max_print = None # type: Any self._count = None # type: Any self._file_name = file_name
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
191
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,187
__call__
def __call__(self, *args, **kw): # type: (Any, Any) -> None if not bool(_debug): return out = sys.stdout if self._file_name is None else open(self._file_name, "a") dbgprint = print # to fool checking for print statements by dv utility kw1 = kw.copy() kw1["fil...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
197
217
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,188
set_max_print
def set_max_print(self, i): # type: (int) -> None self._max_print = i self._count = None
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
219
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,189
check_namespace_char
def check_namespace_char(ch): # type: (Any) -> bool if u"\x21" <= ch <= u"\x7E": # ! to ~ return True if u"\xA0" <= ch <= u"\uD7FF": return True if (u"\uE000" <= ch <= u"\uFFFD") and ch != u"\uFEFF": # excl. byte order mark return True if u"\U00010000" <= ch <= u"\U0010FFFF...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
231
241
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,190
check_anchorname_char
def check_anchorname_char(ch): # type: (Any) -> bool if ch in u",[]{}": return False return check_namespace_char(ch)
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
244
248
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,191
version_tnf
def version_tnf(t1, t2=None): # type: (Any, Any) -> Any """ return True if srsly.ruamel_yaml version_info < t1, None if t2 is specified and bigger else False """ from srsly.ruamel_yaml import version_info # NOQA if version_info < t1: return True if t2 is not None and version_info <...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
251
262
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,192
__getitem__
def __getitem__(self, index): # type: (Any) -> Any if not isinstance(index, slice): return self.__getsingleitem__(index) return type(self)( [self[i] for i in range(*index.indices(len(self)))] ) # type: ignore
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
268
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,193
__setitem__
def __setitem__(self, index, value): # type: (Any, Any) -> None if not isinstance(index, slice): return self.__setsingleitem__(index, value) assert iter(value) # nprint(index.start, index.stop, index.step, index.indices(len(self))) if index.step is None: d...
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
276
305
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,194
__delitem__
def __delitem__(self, index): # type: (Any) -> None if not isinstance(index, slice): return self.__delsingleitem__(index) # nprint(index.start, index.stop, index.step, index.indices(len(self))) for i in reversed(range(*index.indices(len(self)))): del self[i]
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
307
313
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,195
__getsingleitem__
def __getsingleitem__(self, index): # type: (Any) -> Any raise IndexError
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
316
318
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,196
__setsingleitem__
def __setsingleitem__(self, index, value): # type: (Any, Any) -> None raise IndexError
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
321
323
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,197
__delsingleitem__
def __delsingleitem__(self, index): # type: (Any) -> None raise IndexError
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/compat.py
326
328
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,198
__init__
def __init__(self, name, index, line, column): # type: (Any, int, int, int) -> None self.name = name self.index = index self.line = line self.column = column
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/error.py
30
35
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,199
__str__
def __str__(self): # type: () -> Any where = ' in "%s", line %d, column %d' % ( self.name, self.line + 1, self.column + 1, ) return where
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/error.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,200
__eq__
def __eq__(self, other): # type: (Any) -> bool if self.line != other.line or self.column != other.column: return False if self.name != other.name or self.index != other.index: return False return True
python
python-3.10.8.amd64/Lib/site-packages/srsly/ruamel_yaml/error.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 }