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,201 | _pair_set_add | def _pair_set_add(data, a, b, are_mutually_exclusive):
sub_dict = data.get(a)
if not sub_dict:
sub_dict = {}
data[a] = sub_dict
sub_dict[b] = are_mutually_exclusive | python | wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/pair_set.py | 36 | 43 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,202 | get_version | def get_version(version=None):
"Returns a PEP 440-compliant version number from VERSION."
version = get_complete_version(version)
# Now build the two parts of the version number:
# main = X.Y[.Z]
# sub = .devN - for pre-alpha releases
# | {a|b|rc}N - for alpha, beta, and rc releases
ma... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py | 8 | 30 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,203 | get_main_version | def get_main_version(version=None):
"Returns main version (X.Y[.Z]) from VERSION."
version = get_complete_version(version)
parts = 2 if version[2] == 0 else 3
return '.'.join(str(x) for x in version[:parts]) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py | 33 | 37 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,204 | get_complete_version | def get_complete_version(version=None):
"""Returns a tuple of the graphql version. If version argument is non-empty,
then checks for correctness of the tuple provided.
"""
if version is None:
from wandb_graphql import VERSION as version
else:
assert len(version) == 5
assert v... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py | 40 | 50 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,205 | get_docs_version | def get_docs_version(version=None):
version = get_complete_version(version)
if version[3] != 'final':
return 'dev'
else:
return '%d.%d' % version[:2] | python | wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py | 53 | 58 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,206 | get_git_changeset | def get_git_changeset():
"""Returns a numeric identifier of the latest git changeset.
The result is the UTC timestamp of the changeset in YYYYMMDDHHMMSS format.
This value isn't guaranteed to be unique, but collisions are very unlikely,
so it's sufficient for generating the development version numbers.
... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/version.py | 61 | 78 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,207 | __init__ | def __init__(self, func):
self.__doc__ = getattr(func, '__doc__')
self.func = func | python | wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/cached_property.py | 9 | 11 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,208 | __get__ | def __get__(self, obj, cls):
if obj is None:
return self
value = obj.__dict__[self.func.__name__] = self.func(obj)
return value | python | wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/cached_property.py | 13 | 17 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,209 | __init__ | def __init__(self, default_factory=None, *a, **kw):
if default_factory is not None and not callable(default_factory):
raise TypeError('first argument must be callable')
OrderedDict.__init__(self, *a, **kw)
self.default_factory = default_factory | python | wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/default_ordered_dict.py | 9 | 14 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,210 | __missing__ | def __missing__(self, key):
if self.default_factory is None:
raise KeyError(key)
self[key] = value = self.default_factory()
return value | python | wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/default_ordered_dict.py | 16 | 20 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,211 | __reduce__ | def __reduce__(self):
if self.default_factory is None:
args = tuple()
else:
args = self.default_factory,
return type(self), args, None, None, iter(self.items()) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/default_ordered_dict.py | 22 | 27 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,212 | copy | def copy(self):
return self.__copy__() | python | wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/default_ordered_dict.py | 29 | 30 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,213 | __copy__ | def __copy__(self):
return type(self)(self.default_factory, self) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/default_ordered_dict.py | 32 | 33 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,214 | __deepcopy__ | def __deepcopy__(self, memo):
return self.__class__(self.default_factory, copy.deepcopy(list(self.items()))) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/default_ordered_dict.py | 35 | 36 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,215 | __repr__ | def __repr__(self):
return 'DefaultOrderedDict(%s, %s)' % (self.default_factory,
OrderedDict.__repr__(self)[19:-1]) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/default_ordered_dict.py | 38 | 40 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,216 | contain_subset | def contain_subset(expected, actual):
t_actual = type(actual)
t_expected = type(expected)
actual_is_dict = issubclass(t_actual, dict)
expected_is_dict = issubclass(t_expected, dict)
both_dicts = actual_is_dict and expected_is_dict
if not(both_dicts) and not(issubclass(t_actual, t_expected) or is... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/pyutils/contain_subset.py | 4 | 28 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,217 | __init__ | def __init__(self, source, position, description):
location = get_location(source, position)
super(GraphQLSyntaxError, self).__init__(
message=u'Syntax Error {} ({}:{}) {}\n\n{}'.format(
source.name,
location.line,
location.column,
... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/error/syntax_error.py | 9 | 21 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,218 | highlight_source_at_location | def highlight_source_at_location(source, location):
line = location.line
lines = source.body.splitlines()
pad_len = len(str(line + 1))
result = u''
format = (u'{:>' + str(pad_len) + '}: {}\n').format
if line >= 2:
result += format(line - 1, lines[line - 2])
result += format(line, lin... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/error/syntax_error.py | 24 | 36 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,219 | __init__ | def __init__(self, nodes, original_error=None):
if original_error:
try:
message = str(original_error)
except UnicodeEncodeError:
message = original_error.message.encode('utf-8')
else:
message = 'An unknown error occurred.'
if h... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/error/located_error.py | 10 | 29 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,220 | format_error | def format_error(error):
formatted_error = {
'message': error.message,
}
if error.locations is not None:
formatted_error['locations'] = [
{'line': loc.line, 'column': loc.column}
for loc in error.locations
]
return formatted_error | python | wandb/vendor/graphql-core-1.1/wandb_graphql/error/format_error.py | 1 | 11 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,221 | __init__ | def __init__(self, message, nodes=None, stack=None, source=None, positions=None):
super(GraphQLError, self).__init__(message)
self.message = message
self.nodes = nodes
self.stack = stack
self._source = source
self._positions = positions | python | wandb/vendor/graphql-core-1.1/wandb_graphql/error/base.py | 7 | 13 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,222 | source | def source(self):
if self._source:
return self._source
if self.nodes:
node = self.nodes[0]
return node and node.loc and node.loc.source | python | wandb/vendor/graphql-core-1.1/wandb_graphql/error/base.py | 16 | 21 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,223 | positions | def positions(self):
if self._positions:
return self._positions
if self.nodes is not None:
node_positions = [node.loc and node.loc.start for node in self.nodes]
if any(node_positions):
return node_positions | python | wandb/vendor/graphql-core-1.1/wandb_graphql/error/base.py | 24 | 30 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,224 | reraise | def reraise(self):
if self.stack:
raise self.with_traceback(self.stack)
else:
raise self | python | wandb/vendor/graphql-core-1.1/wandb_graphql/error/base.py | 32 | 36 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,225 | locations | def locations(self):
source = self.source
if self.positions and source:
return [get_location(source, pos) for pos in self.positions] | python | wandb/vendor/graphql-core-1.1/wandb_graphql/error/base.py | 39 | 42 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,226 | validate | def validate(schema, ast, rules=specified_rules):
assert schema, 'Must provide schema'
assert ast, 'Must provide document'
assert isinstance(schema, GraphQLSchema)
type_info = TypeInfo(schema)
return visit_using_rules(schema, type_info, ast, rules) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 9 | 14 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,227 | visit_using_rules | def visit_using_rules(schema, type_info, ast, rules):
context = ValidationContext(schema, ast, type_info)
visitors = [rule(context) for rule in rules]
visit(ast, TypeInfoVisitor(type_info, ParallelVisitor(visitors)))
return context.get_errors() | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 17 | 21 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,228 | __init__ | def __init__(self, node, type):
self.node = node
self.type = type | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 27 | 29 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,229 | __init__ | def __init__(self, usages, type_info):
self.usages = usages
self.type_info = type_info | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 35 | 37 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,230 | enter_VariableDefinition | def enter_VariableDefinition(self, node, key, parent, path, ancestors):
return False | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 39 | 40 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,231 | enter_Variable | def enter_Variable(self, node, key, parent, path, ancestors):
usage = VariableUsage(node, type=self.type_info.get_input_type())
self.usages.append(usage) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 42 | 44 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,232 | __init__ | def __init__(self, schema, ast, type_info):
self._schema = schema
self._ast = ast
self._type_info = type_info
self._errors = []
self._fragments = None
self._fragment_spreads = {}
self._recursively_referenced_fragments = {}
self._variable_usages = {}
... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 51 | 60 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,233 | report_error | def report_error(self, error):
self._errors.append(error) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 62 | 63 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,234 | get_errors | def get_errors(self):
return self._errors | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 65 | 66 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,235 | get_schema | def get_schema(self):
return self._schema | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 68 | 69 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,236 | get_variable_usages | def get_variable_usages(self, node):
usages = self._variable_usages.get(node)
if usages is None:
usages = []
sub_visitor = UsageVisitor(usages, self._type_info)
visit(node, TypeInfoVisitor(self._type_info, sub_visitor))
self._variable_usages[node] = usages... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 71 | 79 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,237 | get_recursive_variable_usages | def get_recursive_variable_usages(self, operation):
assert isinstance(operation, OperationDefinition)
usages = self._recursive_variable_usages.get(operation)
if usages is None:
usages = self.get_variable_usages(operation)
fragments = self.get_recursively_referenced_fragme... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 81 | 91 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,238 | get_recursively_referenced_fragments | def get_recursively_referenced_fragments(self, operation):
assert isinstance(operation, OperationDefinition)
fragments = self._recursively_referenced_fragments.get(operation)
if not fragments:
fragments = []
collected_names = set()
nodes_to_visit = [operation.... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 93 | 112 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,239 | get_fragment_spreads | def get_fragment_spreads(self, node):
spreads = self._fragment_spreads.get(node)
if not spreads:
spreads = []
sets_to_visit = [node]
while sets_to_visit:
_set = sets_to_visit.pop()
for selection in _set.selections:
i... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 114 | 128 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,240 | get_ast | def get_ast(self):
return self._ast | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 130 | 131 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,241 | get_fragment | def get_fragment(self, name):
fragments = self._fragments
if fragments is None:
self._fragments = fragments = {}
for statement in self.get_ast().definitions:
if isinstance(statement, FragmentDefinition):
fragments[statement.name.value] = statem... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 133 | 140 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,242 | get_type | def get_type(self):
return self._type_info.get_type() | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 142 | 143 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,243 | get_parent_type | def get_parent_type(self):
return self._type_info.get_parent_type() | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 145 | 146 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,244 | get_input_type | def get_input_type(self):
return self._type_info.get_input_type() | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 148 | 149 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,245 | get_field_def | def get_field_def(self):
return self._type_info.get_field_def() | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 151 | 152 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,246 | get_directive | def get_directive(self):
return self._type_info.get_directive() | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 154 | 155 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,247 | get_argument | def get_argument(self):
return self._type_info.get_argument() | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/validation.py | 157 | 158 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,248 | __init__ | def __init__(self, context):
super(UniqueOperationNames, self).__init__(context)
self.known_operation_names = {} | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_operation_names.py | 8 | 10 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,249 | enter_OperationDefinition | def enter_OperationDefinition(self, node, key, parent, path, ancestors):
operation_name = node.name
if not operation_name:
return
if operation_name.value in self.known_operation_names:
self.context.report_error(GraphQLError(
self.duplicate_operation_name_... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_operation_names.py | 12 | 24 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,250 | enter_FragmentDefinition | def enter_FragmentDefinition(self, node, key, parent, path, ancestors):
return False | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_operation_names.py | 26 | 27 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,251 | duplicate_operation_name_message | def duplicate_operation_name_message(operation_name):
return 'There can only be one operation named "{}".'.format(operation_name) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_operation_names.py | 30 | 31 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,252 | __init__ | def __init__(self, context):
super(UniqueFragmentNames, self).__init__(context)
self.known_fragment_names = {} | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_fragment_names.py | 8 | 10 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,253 | enter_OperationDefinition | def enter_OperationDefinition(self, node, key, parent, path, ancestors):
return False | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_fragment_names.py | 12 | 13 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,254 | enter_FragmentDefinition | def enter_FragmentDefinition(self, node, key, parent, path, ancestors):
fragment_name = node.name.value
if fragment_name in self.known_fragment_names:
self.context.report_error(GraphQLError(
self.duplicate_fragment_name_message(fragment_name),
[self.known_frag... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_fragment_names.py | 15 | 24 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,255 | duplicate_fragment_name_message | def duplicate_fragment_name_message(field):
return 'There can only be one fragment named "{}".'.format(field) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_fragment_names.py | 27 | 28 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,256 | enter_FragmentSpread | def enter_FragmentSpread(self, node, key, parent, path, ancestors):
fragment_name = node.name.value
fragment = self.context.get_fragment(fragment_name)
if not fragment:
self.context.report_error(GraphQLError(
self.unknown_fragment_message(fragment_name),
... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_fragment_names.py | 7 | 15 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,257 | unknown_fragment_message | def unknown_fragment_message(fragment_name):
return 'Unknown fragment "{}".'.format(fragment_name) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_fragment_names.py | 18 | 19 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,258 | __init__ | def __init__(self, context):
super(NoUnusedFragments, self).__init__(context)
self.operation_definitions = []
self.fragment_definitions = [] | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_unused_fragments.py | 8 | 11 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,259 | enter_OperationDefinition | def enter_OperationDefinition(self, node, key, parent, path, ancestors):
self.operation_definitions.append(node)
return False | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_unused_fragments.py | 13 | 15 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,260 | enter_FragmentDefinition | def enter_FragmentDefinition(self, node, key, parent, path, ancestors):
self.fragment_definitions.append(node)
return False | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_unused_fragments.py | 17 | 19 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,261 | leave_Document | def leave_Document(self, node, key, parent, path, ancestors):
fragment_names_used = set()
for operation in self.operation_definitions:
fragments = self.context.get_recursively_referenced_fragments(operation)
for fragment in fragments:
fragment_names_used.add(frag... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_unused_fragments.py | 21 | 34 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,262 | unused_fragment_message | def unused_fragment_message(fragment_name):
return 'Fragment "{}" is never used.'.format(fragment_name) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_unused_fragments.py | 37 | 38 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,263 | enter_InlineFragment | def enter_InlineFragment(self, node, key, parent, path, ancestors):
frag_type = self.context.get_type()
parent_type = self.context.get_parent_type()
schema = self.context.get_schema()
if frag_type and parent_type and not do_types_overlap(schema, frag_type, parent_type):
self.... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/possible_fragment_spreads.py | 9 | 17 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,264 | enter_FragmentSpread | def enter_FragmentSpread(self, node, key, parent, path, ancestors):
frag_name = node.name.value
frag_type = self.get_fragment_type(self.context, frag_name)
parent_type = self.context.get_parent_type()
schema = self.context.get_schema()
if frag_type and parent_type and not do_type... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/possible_fragment_spreads.py | 19 | 28 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,265 | get_fragment_type | def get_fragment_type(context, name):
frag = context.get_fragment(name)
return frag and type_from_ast(context.get_schema(), frag.type_condition) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/possible_fragment_spreads.py | 31 | 33 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,266 | type_incompatible_spread_message | def type_incompatible_spread_message(frag_name, parent_type, frag_type):
return 'Fragment {} cannot be spread here as objects of type {} can never be of type {}'.format(frag_name,
parent_type,
... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/possible_fragment_spreads.py | 36 | 39 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,267 | type_incompatible_anon_spread_message | def type_incompatible_anon_spread_message(parent_type, frag_type):
return 'Fragment cannot be spread here as objects of type {} can never be of type {}'.format(parent_type,
frag_type) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/possible_fragment_spreads.py | 42 | 44 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,268 | enter_VariableDefinition | def enter_VariableDefinition(self, node, key, parent, path, ancestors):
name = node.variable.name.value
default_value = node.default_value
type = self.context.get_input_type()
if isinstance(type, GraphQLNonNull) and default_value:
self.context.report_error(GraphQLError(
... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/default_values_of_correct_type.py | 10 | 28 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,269 | enter_SelectionSet | def enter_SelectionSet(self, node, key, parent, path, ancestors):
return False | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/default_values_of_correct_type.py | 30 | 31 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,270 | enter_FragmentDefinition | def enter_FragmentDefinition(self, node, key, parent, path, ancestors):
return False | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/default_values_of_correct_type.py | 33 | 34 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,271 | default_for_non_null_arg_message | def default_for_non_null_arg_message(var_name, type, guess_type):
return u'Variable "${}" of type "{}" is required and will not use the default value. ' \
u'Perhaps you meant to use type "{}".'.format(var_name, type, guess_type) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/default_values_of_correct_type.py | 37 | 39 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,272 | bad_value_for_default_arg_message | def bad_value_for_default_arg_message(var_name, type, value, verbose_errors):
message = (u'\n' + u'\n'.join(verbose_errors)) if verbose_errors else u''
return u'Variable "${}" of type "{}" has invalid default value: {}.{}'.format(var_name, type, value, message) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/default_values_of_correct_type.py | 42 | 44 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,273 | __init__ | def __init__(self, context):
super(UniqueVariableNames, self).__init__(context)
self.known_variable_names = {} | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_variable_names.py | 8 | 10 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,274 | enter_OperationDefinition | def enter_OperationDefinition(self, node, key, parent, path, ancestors):
self.known_variable_names = {} | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_variable_names.py | 12 | 13 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,275 | enter_VariableDefinition | def enter_VariableDefinition(self, node, key, parent, path, ancestors):
variable_name = node.variable.name.value
if variable_name in self.known_variable_names:
self.context.report_error(GraphQLError(
self.duplicate_variable_message(variable_name),
[self.known_... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_variable_names.py | 15 | 23 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,276 | duplicate_variable_message | def duplicate_variable_message(operation_name):
return 'There can be only one variable named "{}".'.format(operation_name) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_variable_names.py | 26 | 27 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,277 | enter_Directive | def enter_Directive(self, node, key, parent, path, ancestors):
directive_def = next((
definition for definition in self.context.get_schema().get_directives()
if definition.name == node.name.value
), None)
if not directive_def:
return self.context.report_error... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_directives.py | 9 | 31 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,278 | unknown_directive_message | def unknown_directive_message(directive_name):
return 'Unknown directive "{}".'.format(directive_name) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_directives.py | 34 | 35 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,279 | misplaced_directive_message | def misplaced_directive_message(directive_name, location):
return 'Directive "{}" may not be used on "{}".'.format(directive_name, location) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_directives.py | 38 | 39 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,280 | get_directive_location_for_ast_path | def get_directive_location_for_ast_path(ancestors):
applied_to = ancestors[-1]
if isinstance(applied_to, ast.OperationDefinition):
return _operation_definition_map.get(applied_to.operation)
elif isinstance(applied_to, ast.Field):
return DirectiveLocation.FIELD
elif isinstance(applied_t... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_directives.py | 49 | 97 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,281 | enter_Argument | def enter_Argument(self, node, key, parent, path, ancestors):
arg_def = self.context.get_argument()
if arg_def:
errors = is_valid_literal_value(arg_def.type, node.value)
if errors:
self.context.report_error(GraphQLError(
self.bad_value_message(... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/arguments_of_correct_type.py | 9 | 19 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,282 | bad_value_message | def bad_value_message(arg_name, type, value, verbose_errors):
message = (u'\n' + u'\n'.join(verbose_errors)) if verbose_errors else ''
return 'Argument "{}" has invalid value {}.{}'.format(arg_name, value, message) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/arguments_of_correct_type.py | 22 | 24 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,283 | enter_InlineFragment | def enter_InlineFragment(self, node, key, parent, path, ancestors):
type = self.context.get_type()
if node.type_condition and type and not is_composite_type(type):
self.context.report_error(GraphQLError(
self.inline_fragment_on_non_composite_error_message(print_ast(node.type... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/fragments_on_composite_types.py | 9 | 16 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,284 | enter_FragmentDefinition | def enter_FragmentDefinition(self, node, key, parent, path, ancestors):
type = self.context.get_type()
if type and not is_composite_type(type):
self.context.report_error(GraphQLError(
self.fragment_on_non_composite_error_message(node.name.value, print_ast(node.type_condition... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/fragments_on_composite_types.py | 18 | 25 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,285 | inline_fragment_on_non_composite_error_message | def inline_fragment_on_non_composite_error_message(type):
return 'Fragment cannot condition on non composite type "{}".'.format(type) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/fragments_on_composite_types.py | 28 | 29 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,286 | fragment_on_non_composite_error_message | def fragment_on_non_composite_error_message(frag_name, type):
return 'Fragment "{}" cannot condition on non composite type "{}".'.format(frag_name, type) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/fragments_on_composite_types.py | 32 | 33 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,287 | _unknown_type_message | def _unknown_type_message(type, suggested_types):
message = 'Unknown type "{}".'.format(type)
if suggested_types:
message += ' Perhaps you meant {}?'.format(quoted_or_list(suggested_types))
return message | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_type_names.py | 7 | 12 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,288 | enter_ObjectTypeDefinition | def enter_ObjectTypeDefinition(self, node, *args):
return False | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_type_names.py | 17 | 18 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,289 | enter_InterfaceTypeDefinition | def enter_InterfaceTypeDefinition(self, node, *args):
return False | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_type_names.py | 20 | 21 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,290 | enter_UnionTypeDefinition | def enter_UnionTypeDefinition(self, node, *args):
return False | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_type_names.py | 23 | 24 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,291 | enter_InputObjectTypeDefinition | def enter_InputObjectTypeDefinition(self, node, *args):
return False | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_type_names.py | 26 | 27 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,292 | enter_NamedType | def enter_NamedType(self, node, *args):
schema = self.context.get_schema()
type_name = node.name.value
type = schema.get_type(type_name)
if not type:
self.context.report_error(
GraphQLError(
_unknown_type_message(
t... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_type_names.py | 29 | 43 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,293 | __init__ | def __init__(self, context):
super(UniqueArgumentNames, self).__init__(context)
self.known_arg_names = {} | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_argument_names.py | 8 | 10 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,294 | enter_Field | def enter_Field(self, node, key, parent, path, ancestors):
self.known_arg_names = {} | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_argument_names.py | 12 | 13 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,295 | enter_Directive | def enter_Directive(self, node, key, parent, path, ancestors):
self.known_arg_names = {} | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_argument_names.py | 15 | 16 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,296 | enter_Argument | def enter_Argument(self, node, key, parent, path, ancestors):
arg_name = node.name.value
if arg_name in self.known_arg_names:
self.context.report_error(GraphQLError(
self.duplicate_arg_message(arg_name),
[self.known_arg_names[arg_name], node.name]
... | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_argument_names.py | 18 | 28 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,297 | duplicate_arg_message | def duplicate_arg_message(field):
return 'There can only be one argument named "{}".'.format(field) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_argument_names.py | 31 | 32 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,298 | __init__ | def __init__(self, context):
self.operation_count = 0
super(LoneAnonymousOperation, self).__init__(context) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/lone_anonymous_operation.py | 9 | 11 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,299 | enter_Document | def enter_Document(self, node, key, parent, path, ancestors):
self.operation_count = \
sum(1 for definition in node.definitions if isinstance(definition, ast.OperationDefinition)) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/lone_anonymous_operation.py | 13 | 15 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
6,300 | enter_OperationDefinition | def enter_OperationDefinition(self, node, key, parent, path, ancestors):
if not node.name and self.operation_count > 1:
self.context.report_error(GraphQLError(self.anonymous_operation_not_alone_message(), [node])) | python | wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/lone_anonymous_operation.py | 17 | 19 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.