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,901
parse_enum_value_name
def parse_enum_value_name(self) -> NameNode: """EnumValue: Name but not ``true``, ``false`` or ``null``""" if self._lexer.token.value in ("true", "false", "null"): raise GraphQLSyntaxError( self._lexer.source, self._lexer.token.start, f"{get_to...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
844
853
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,902
parse_input_object_type_definition
def parse_input_object_type_definition(self) -> InputObjectTypeDefinitionNode: """InputObjectTypeDefinition""" start = self._lexer.token description = self.parse_description() self.expect_keyword("input") name = self.parse_name() directives = self.parse_const_directives()...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
855
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,903
parse_input_fields_definition
def parse_input_fields_definition(self) -> List[InputValueDefinitionNode]: """InputFieldsDefinition: {InputValueDefinition+}""" return self.optional_many( TokenKind.BRACE_L, self.parse_input_value_def, TokenKind.BRACE_R )
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
871
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,904
parse_schema_extension
def parse_schema_extension(self) -> SchemaExtensionNode: """SchemaExtension""" start = self._lexer.token self.expect_keyword("extend") self.expect_keyword("schema") directives = self.parse_const_directives() operation_types = self.optional_many( TokenKind.BRAC...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
877
890
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,905
parse_scalar_type_extension
def parse_scalar_type_extension(self) -> ScalarTypeExtensionNode: """ScalarTypeExtension""" start = self._lexer.token self.expect_keyword("extend") self.expect_keyword("scalar") name = self.parse_name() directives = self.parse_const_directives() if not directives:...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
892
903
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,906
parse_object_type_extension
def parse_object_type_extension(self) -> ObjectTypeExtensionNode: """ObjectTypeExtension""" start = self._lexer.token self.expect_keyword("extend") self.expect_keyword("type") name = self.parse_name() interfaces = self.parse_implements_interfaces() directives = se...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
905
922
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,907
parse_interface_type_extension
def parse_interface_type_extension(self) -> InterfaceTypeExtensionNode: """InterfaceTypeExtension""" start = self._lexer.token self.expect_keyword("extend") self.expect_keyword("interface") name = self.parse_name() interfaces = self.parse_implements_interfaces() d...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
924
941
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,908
parse_union_type_extension
def parse_union_type_extension(self) -> UnionTypeExtensionNode: """UnionTypeExtension""" start = self._lexer.token self.expect_keyword("extend") self.expect_keyword("union") name = self.parse_name() directives = self.parse_const_directives() types = self.parse_uni...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
943
955
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,909
parse_enum_type_extension
def parse_enum_type_extension(self) -> EnumTypeExtensionNode: """EnumTypeExtension""" start = self._lexer.token self.expect_keyword("extend") self.expect_keyword("enum") name = self.parse_name() directives = self.parse_const_directives() values = self.parse_enum_v...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
957
969
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,910
parse_input_object_type_extension
def parse_input_object_type_extension(self) -> InputObjectTypeExtensionNode: """InputObjectTypeExtension""" start = self._lexer.token self.expect_keyword("extend") self.expect_keyword("input") name = self.parse_name() directives = self.parse_const_directives() fie...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
971
983
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,911
parse_directive_definition
def parse_directive_definition(self) -> DirectiveDefinitionNode: """DirectiveDefinition""" start = self._lexer.token description = self.parse_description() self.expect_keyword("directive") self.expect_token(TokenKind.AT) name = self.parse_name() args = self.parse_...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
985
1,003
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,912
parse_directive_locations
def parse_directive_locations(self) -> List[NameNode]: """DirectiveLocations""" return self.delimited_many(TokenKind.PIPE, self.parse_directive_location)
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
1,005
1,007
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,913
parse_directive_location
def parse_directive_location(self) -> NameNode: """DirectiveLocation""" start = self._lexer.token name = self.parse_name() if name.value in DirectiveLocation.__members__: return name raise self.unexpected(start)
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
1,009
1,015
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,914
loc
def loc(self, start_token: Token) -> Optional[Location]: """Return a location object. Used to identify the place in the source that created a given parsed object. """ if not self._no_location: end_token = self._lexer.last_token source = self._lexer.source ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
1,019
1,028
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,915
peek
def peek(self, kind: TokenKind) -> bool: """Determine if the next token is of a given kind""" return self._lexer.token.kind == kind
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
1,030
1,032
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,916
expect_token
def expect_token(self, kind: TokenKind) -> Token: """Expect the next token to be of the given kind. If the next token is of the given kind, return that token after advancing the lexer. Otherwise, do not change the parser state and throw an error. """ token = self._lexer.token ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
1,034
1,049
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,917
expect_optional_token
def expect_optional_token(self, kind: TokenKind) -> bool: """Expect the next token optionally to be of the given kind. If the next token is of the given kind, return True after advancing the lexer. Otherwise, do not change the parser state and return False. """ token = self._lex...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
1,051
1,062
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,918
expect_keyword
def expect_keyword(self, value: str) -> None: """Expect the next token to be a given keyword. If the next token is a given keyword, advance the lexer. Otherwise, do not change the parser state and throw an error. """ token = self._lexer.token if token.kind == TokenKind.N...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
1,064
1,078
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,919
expect_optional_keyword
def expect_optional_keyword(self, value: str) -> bool: """Expect the next token optionally to be a given keyword. If the next token is a given keyword, return True after advancing the lexer. Otherwise, do not change the parser state and return False. """ token = self._lexer.toke...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
1,080
1,091
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,920
unexpected
def unexpected(self, at_token: Optional[Token] = None) -> GraphQLError: """Create an error when an unexpected lexed token is encountered.""" token = at_token or self._lexer.token return GraphQLSyntaxError( self._lexer.source, token.start, f"Unexpected {get_token_desc(token)}." ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
1,093
1,098
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,921
any
def any( self, open_kind: TokenKind, parse_fn: Callable[[], T], close_kind: TokenKind ) -> List[T]: """Fetch any matching nodes, possibly none. Returns a possibly empty list of parse nodes, determined by the ``parse_fn``. This list begins with a lex token of ``open_kind`` and ends w...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
1,100
1,116
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,922
optional_many
def optional_many( self, open_kind: TokenKind, parse_fn: Callable[[], T], close_kind: TokenKind ) -> List[T]: """Fetch matching nodes, maybe none. Returns a list of parse nodes, determined by the ``parse_fn``. It can be empty only if the open token is missing, otherwise it will alwa...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
1,118
1,136
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,923
many
def many( self, open_kind: TokenKind, parse_fn: Callable[[], T], close_kind: TokenKind ) -> List[T]: """Fetch matching nodes, at least one. Returns a non-empty list of parse nodes, determined by the ``parse_fn``. This list begins with a lex token of ``open_kind`` and ends with a lex...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
1,138
1,154
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,924
delimited_many
def delimited_many( self, delimiter_kind: TokenKind, parse_fn: Callable[[], T] ) -> List[T]: """Fetch many delimited nodes. Returns a non-empty list of parse nodes, determined by the ``parse_fn``. This list may begin with a lex token of ``delimiter_kind`` followed by items s...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
1,156
1,174
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,925
advance_lexer
def advance_lexer(self) -> None: max_tokens = self._max_tokens token = self._lexer.advance() if max_tokens is not None and token.kind != TokenKind.EOF: self._token_counter += 1 if self._token_counter > max_tokens: raise GraphQLSyntaxError( ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
1,176
1,188
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,926
get_token_desc
def get_token_desc(token: Token) -> str: """Describe a token as a string for debugging.""" value = token.value return get_token_kind_desc(token.kind) + ( f" '{value}'" if value is not None else "" )
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
1,191
1,196
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,927
get_token_kind_desc
def get_token_kind_desc(kind: TokenKind) -> str: """Describe a token kind as a string for debugging.""" return f"'{kind.value}'" if is_punctuator_token_kind(kind) else kind.value
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/parser.py
1,199
1,201
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,928
formatted
def formatted(self) -> FormattedSourceLocation: return dict(line=self.line, column=self.column)
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/location.py
28
29
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,929
__eq__
def __eq__(self, other: Any) -> bool: if isinstance(other, dict): return self.formatted == other return tuple(self) == other
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/location.py
31
34
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,930
__ne__
def __ne__(self, other: Any) -> bool: return not self == other
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/location.py
36
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,931
get_location
def get_location(source: "Source", position: int) -> SourceLocation: """Get the line and column for a character position in the source. Takes a Source and a UTF-8 character offset, and returns the corresponding line and column as a SourceLocation. """ return source.get_location(position)
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/location.py
40
46
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,932
__init_subclass__
def __init_subclass__(cls) -> None: """Verify that all defined handlers are valid.""" super().__init_subclass__() for attr, val in cls.__dict__.items(): if attr.startswith("_"): continue attr_kind = attr.split("_", 1) if len(attr_kind) < 2: ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/visitor.py
109
128
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,933
__init__
def __init__(self) -> None: self.enter_leave_map = {}
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/visitor.py
130
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,934
get_enter_leave_for_kind
def get_enter_leave_for_kind(self, kind: str) -> EnterLeaveVisitor: """Given a node kind, return the EnterLeaveVisitor for that kind.""" try: return self.enter_leave_map[kind] except KeyError: enter_fn = getattr(self, f"enter_{kind}", None) if not enter_fn: ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/visitor.py
133
146
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,935
get_visit_fn
def get_visit_fn( self, kind: str, is_leaving: bool = False ) -> Optional[Callable[..., Optional[VisitorAction]]]: """Get the visit function for the given node kind and direction. .. deprecated:: 3.2 Please use ``get_enter_leave_for_kind`` instead. Will be removed in v3.3. ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/visitor.py
148
157
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,936
visit
def visit( root: Node, visitor: Visitor, visitor_keys: Optional[VisitorKeyMap] = None ) -> Any: """Visit each node in an AST. :func:`~.visit` will walk through an AST using a depth-first traversal, calling the visitor's enter methods at each node in the traversal, and calling the leave methods afte...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/visitor.py
170
304
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,937
__init__
def __init__(self, visitors: Collection[Visitor]): """Create a new visitor from the given list of parallel visitors.""" super().__init__() self.visitors = visitors self.skipping: List[Any] = [None] * len(visitors)
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/visitor.py
315
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,938
get_enter_leave_for_kind
def get_enter_leave_for_kind(self, kind: str) -> EnterLeaveVisitor: """Given a node kind, return the EnterLeaveVisitor for that kind.""" try: return self.enter_leave_map[kind] except KeyError: has_visitor = False enter_list: List[Optional[Callable[..., Optiona...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/visitor.py
321
376
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,939
enter
def enter(node: Node, *args: Any) -> Optional[VisitorAction]: skipping = self.skipping for i, fn in enumerate(enter_list): if not skipping[i]: if fn: result = fn(node, *args) ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/visitor.py
338
350
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,940
leave
def leave(node: Node, *args: Any) -> Optional[VisitorAction]: skipping = self.skipping for i, fn in enumerate(leave_list): if not skipping[i]: if fn: result = fn(node, *args) ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/visitor.py
352
368
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,941
__init__
def __init__(self, source: Source): """Given a Source object, initialize a Lexer for that source.""" self.source = source self.token = self.last_token = Token(TokenKind.SOF, 0, 0, 0, 0) self.line, self.line_start = 1, 0
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
29
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,942
advance
def advance(self) -> Token: """Advance the token stream to the next non-ignored token.""" self.last_token = self.token token = self.token = self.lookahead() return token
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
35
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,943
lookahead
def lookahead(self) -> Token: """Look ahead and return the next non-ignored token, but do not change state.""" token = self.token if token.kind != TokenKind.EOF: while True: if token.next: token = token.next else: ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
41
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,944
print_code_point_at
def print_code_point_at(self, location: int) -> str: """Print the code point at the given location. Prints the code point (or end of file reference) at a given location in a source for use in error messages. Printable ASCII is printed quoted, while other points are printed in Unicode ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
58
82
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,945
create_token
def create_token( self, kind: TokenKind, start: int, end: int, value: Optional[str] = None ) -> Token: """Create a token with line and column location information.""" line = self.line col = 1 + start - self.line_start return Token(kind, start, end, line, col, value)
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
84
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,946
read_next_token
def read_next_token(self, start: int) -> Token: """Get the next token from the source starting at the given position. This skips over whitespace until it finds the next lexable token, then lexes punctuators immediately or calls the appropriate helper function for more complicated tokens...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
92
159
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,947
read_comment
def read_comment(self, start: int) -> Token: """Read a comment token from the source file.""" body = self.source.body body_length = len(body) position = start + 1 while position < body_length: char = body[position] if char in "\r\n": break...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
161
183
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,948
read_number
def read_number(self, start: int, first_char: str) -> Token: """Reads a number token from the source file. This can be either a FloatValue or an IntValue, depending on whether a FractionalPart or ExponentPart is encountered. """ body = self.source.body position = start ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
185
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,949
read_digits
def read_digits(self, start: int, first_char: str) -> int: """Return the new position in the source after reading one or more digits.""" if not is_digit(first_char): raise GraphQLSyntaxError( self.source, start, "Invalid number, expected digit ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
244
259
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,950
read_string
def read_string(self, start: int) -> Token: """Read a single-quote string token from the source file.""" body = self.source.body body_length = len(body) position = start + 1 chunk_start = position value: List[str] = [] append = value.append while position...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
261
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,951
read_escaped_unicode_variable_width
def read_escaped_unicode_variable_width(self, position: int) -> EscapeSequence: body = self.source.body point = 0 size = 3 max_size = min(12, len(body) - position) # Cannot be larger than 12 chars (\u{00000000}). while size < max_size: char = body[position + s...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
315
340
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,952
read_escaped_unicode_fixed_width
def read_escaped_unicode_fixed_width(self, position: int) -> EscapeSequence: body = self.source.body code = read_16_bit_hex_code(body, position + 2) if 0 <= code <= 0xD7FF or 0xE000 <= code <= 0x10FFFF: return EscapeSequence(chr(code), 6) # GraphQL allows JSON-style surroga...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
342
366
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,953
read_escaped_character
def read_escaped_character(self, position: int) -> EscapeSequence: body = self.source.body value = _ESCAPED_CHARS.get(body[position + 1]) if value: return EscapeSequence(value, 2) raise GraphQLSyntaxError( self.source, position, f"Invalid c...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
368
377
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,954
read_block_string
def read_block_string(self, start: int) -> Token: """Read a block string token from the source file.""" body = self.source.body body_length = len(body) line_start = self.line_start position = start + 3 chunk_start = position current_line = "" block_lines...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
379
440
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,955
read_name
def read_name(self, start: int) -> Token: """Read an alphanumeric + underscore name from the source.""" body = self.source.body body_length = len(body) position = start + 1 while position < body_length: char = body[position] if not is_name_continue(char):...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
442
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,956
is_punctuator_token_kind
def is_punctuator_token_kind(kind: TokenKind) -> bool: """Check whether the given token kind corresponds to a punctuator. For internal use only. """ return kind in _punctuator_token_kinds
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
477
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,957
read_16_bit_hex_code
def read_16_bit_hex_code(body: str, position: int) -> int: """Read a 16bit hexadecimal string and return its positive integer value (0-65535). Reads four hexadecimal characters and returns the positive integer that 16bit hexadecimal string represents. For example, "000f" will return 15, and "dead" will...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
514
530
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,958
read_hex_digit
def read_hex_digit(char: str) -> int: """Read a hexadecimal character and returns its positive integer value (0-15). '0' becomes 0, '9' becomes 9 'A' becomes 10, 'F' becomes 15 'a' becomes 10, 'f' becomes 15 Returns -1 if the provided character code was not a valid hexadecimal digit. """ i...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
533
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,959
is_unicode_scalar_value
def is_unicode_scalar_value(char: str) -> bool: """Check whether this is a Unicode scalar value. A Unicode scalar value is any Unicode code point except surrogate code points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and 0xE000 to 0x10FFFF. """ return "\x00" <= char <= "\...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
551
558
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,960
is_supplementary_code_point
def is_supplementary_code_point(body: str, location: int) -> bool: """ Check whether the current location is a supplementary code point. The GraphQL specification defines source text as a sequence of unicode scalar values (which Unicode defines to exclude surrogate code points). """ try: ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/lexer.py
561
574
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,961
__init__
def __init__( self, kind: TokenKind, start: int, end: int, line: int, column: int, value: Optional[str] = None, ) -> None: self.kind = kind self.start, self.end = start, end self.line, self.column = line, column self.value = val...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
96
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,962
__str__
def __str__(self) -> str: return self.desc
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
111
112
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,963
__repr__
def __repr__(self) -> str: """Print a simplified form when appearing in repr() or inspect().""" return f"<Token {self.desc} {self.line}:{self.column}>"
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
114
116
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,964
__inspect__
def __inspect__(self) -> str: return repr(self)
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
118
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,965
__eq__
def __eq__(self, other: Any) -> bool: if isinstance(other, Token): return ( self.kind == other.kind and self.start == other.start and self.end == other.end and self.line == other.line and self.column == other.column ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
121
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,966
__hash__
def __hash__(self) -> int: return hash( (self.kind, self.start, self.end, self.line, self.column, self.value) )
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.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,967
__copy__
def __copy__(self) -> "Token": """Create a shallow copy of the token""" token = self.__class__( self.kind, self.start, self.end, self.line, self.column, self.value, ) token.prev = self.prev return token
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
140
151
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,968
__deepcopy__
def __deepcopy__(self, memo: Dict) -> "Token": """Allow only shallow copies to avoid recursion.""" return copy(self)
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
153
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,969
__getstate__
def __getstate__(self) -> Dict[str, Any]: """Remove the links when pickling. Keeping the links would make pickling a schema too expensive. """ return { key: getattr(self, key) for key in self.__slots__ if key not in {"prev", "next"} }
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
157
166
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,970
__setstate__
def __setstate__(self, state: Dict[str, Any]) -> None: """Reset the links when un-pickling.""" for key, value in state.items(): setattr(self, key, value) self.prev = self.next = None
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
168
172
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,971
desc
def desc(self) -> str: """A helper property to describe a token as a string for debugging""" kind, value = self.kind.value, self.value return f"{kind} {value!r}" if value else kind
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
175
178
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,972
__init__
def __init__(self, start_token: Token, end_token: Token, source: Source) -> None: self.start = start_token.start self.end = end_token.end self.start_token = start_token self.end_token = end_token self.source = source
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
202
207
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,973
__str__
def __str__(self) -> str: return f"{self.start}:{self.end}"
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
209
210
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,974
__repr__
def __repr__(self) -> str: """Print a simplified form when appearing in repr() or inspect().""" return f"<Location {self.start}:{self.end}>"
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
212
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,975
__inspect__
def __inspect__(self) -> str: return repr(self)
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
216
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,976
__eq__
def __eq__(self, other: Any) -> bool: if isinstance(other, Location): return self.start == other.start and self.end == other.end elif isinstance(other, (list, tuple)) and len(other) == 2: return self.start == other[0] and self.end == other[1] return False
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
219
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,977
__ne__
def __ne__(self, other: Any) -> bool: return not self == other
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
226
227
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,978
__hash__
def __hash__(self) -> int: return hash((self.start, self.end))
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
229
230
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,979
__init__
def __init__(self, **kwargs: Any) -> None: """Initialize the node with the given keyword arguments.""" for key in self.keys: value = kwargs.get(key) if isinstance(value, list): value = tuple(value) setattr(self, key, value)
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
326
332
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,980
__repr__
def __repr__(self) -> str: """Get a simple representation of the node.""" name, loc = self.__class__.__name__, getattr(self, "loc", None) return f"{name} at {loc}" if loc else name
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
334
337
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,981
__eq__
def __eq__(self, other: Any) -> bool: """Test whether two nodes are equal (recursively).""" return ( isinstance(other, Node) and self.__class__ == other.__class__ and all(getattr(self, key) == getattr(other, key) for key in self.keys) )
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
339
345
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,982
__hash__
def __hash__(self) -> int: """Get a cached hash value for the node.""" # Caching the hash values improves the performance of AST validators hashed = getattr(self, "_hash", None) if hashed is None: self._hash = id(self) # avoid recursion hashed = hash(tuple(getatt...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
347
355
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,983
__setattr__
def __setattr__(self, key: str, value: Any) -> None: # reset cashed hash value if attributes are changed if hasattr(self, "_hash") and key in self.keys: del self._hash super().__setattr__(key, value)
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
357
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,984
__copy__
def __copy__(self) -> "Node": """Create a shallow copy of the node.""" return self.__class__(**{key: getattr(self, key) for key in self.keys})
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
363
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,985
__deepcopy__
def __deepcopy__(self, memo: Dict) -> "Node": """Create a deep copy of the node""" # noinspection PyArgumentList return self.__class__( **{key: deepcopy(getattr(self, key), memo) for key in self.keys} )
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
367
372
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,986
__init_subclass__
def __init_subclass__(cls) -> None: super().__init_subclass__() name = cls.__name__ try: name = name.removeprefix("Const").removesuffix("Node") except AttributeError: # pragma: no cover (Python < 3.9) if name.startswith("Const"): name = name[5:] ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
374
390
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,987
to_dict
def to_dict(self, locations: bool = False) -> Dict: from ..utilities import ast_to_dict return ast_to_dict(self, locations)
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/ast.py
392
395
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,988
print_string
def print_string(s: str) -> str: """Print a string as a GraphQL StringValue literal. Replaces control characters and excluded characters (" U+0022 and \\ U+005C) with escape sequences. """ if not isinstance(s, str): s = str(s) return f'"{s.translate(escape_sequences)}"'
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/print_string.py
4
12
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,989
dedent_block_string_lines
def dedent_block_string_lines(lines: Collection[str]) -> List[str]: """Produce the value of a block string from its parsed raw value. This function works similar to CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc. It implements the GraphQL spec's BlockStringValue() static ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/block_string.py
11
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,990
leading_white_space
def leading_white_space(s: str) -> int: i = 0 for c in s: if c not in " \t": return i i += 1 return i
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/block_string.py
53
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,991
is_printable_as_block_string
def is_printable_as_block_string(value: str) -> bool: """Check whether the given string is printable as a block string. For internal use only. """ if not isinstance(value, str): value = str(value) # resolve lazy string proxy object if not value: return True # emtpy string is prin...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/block_string.py
62
99
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,992
print_block_string
def print_block_string(value: str, minimize: bool = False) -> str: """Print a block string in the indented block form. Prints a block string in the indented block form by adding a leading and trailing blank line. However, if a block string starts with whitespace and is a single-line, adding a leading b...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/block_string.py
102
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,993
print_ast
def print_ast(ast: Node) -> str: """Convert an AST into a string. The conversion is done using a set of reasonable formatting rules. """ return visit(ast, PrintAstVisitor())
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py
44
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,994
leave_name
def leave_name(node: PrintedNode, *_args: Any) -> str: return node.value
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py
54
55
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,995
leave_variable
def leave_variable(node: PrintedNode, *_args: Any) -> str: return f"${node.name}"
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py
58
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,996
leave_document
def leave_document(node: PrintedNode, *_args: Any) -> str: return join(node.definitions, "\n\n")
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py
64
65
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,997
leave_operation_definition
def leave_operation_definition(node: PrintedNode, *_args: Any) -> str: var_defs = wrap("(", join(node.variable_definitions, ", "), ")") prefix = join( ( node.operation.value, join((node.name, var_defs)), join(node.directives, " "), ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py
68
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,998
leave_variable_definition
def leave_variable_definition(node: PrintedNode, *_args: Any) -> str: return ( f"{node.variable}: {node.type}" f"{wrap(' = ', node.default_value)}" f"{wrap(' ', join(node.directives, ' '))}" )
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py
83
88
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,069,999
leave_selection_set
def leave_selection_set(node: PrintedNode, *_args: Any) -> str: return block(node.selections)
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py
91
92
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,000
leave_field
def leave_field(node: PrintedNode, *_args: Any) -> str: prefix = wrap("", node.alias, ": ") + node.name args_line = prefix + wrap("(", join(node.arguments, ", "), ")") if len(args_line) > MAX_LINE_LENGTH: args_line = prefix + wrap("(\n", indent(join(node.arguments, "\n")), "\n)") ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/language/printer.py
95
102
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }