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,301
anonymous_operation_not_alone_message
def anonymous_operation_not_alone_message(): return 'This anonymous operation must be the only defined operation.'
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/lone_anonymous_operation.py
22
23
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,302
_unknown_arg_message
def _unknown_arg_message(arg_name, field_name, type, suggested_args): message = 'Unknown argument "{}" on field "{}" of type "{}".'.format(arg_name, field_name, type) if suggested_args: message += ' Did you mean {}?'.format(quoted_or_list(suggested_args)) return message
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_argument_names.py
8
13
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,303
_unknown_directive_arg_message
def _unknown_directive_arg_message(arg_name, directive_name, suggested_args): message = 'Unknown argument "{}" on directive "@{}".'.format(arg_name, directive_name) if suggested_args: message += ' Did you mean {}?'.format(quoted_or_list(suggested_args)) return message
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_argument_names.py
16
21
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,304
enter_Argument
def enter_Argument(self, node, key, parent, path, ancestors): argument_of = ancestors[-1] if isinstance(argument_of, ast.Field): field_def = self.context.get_field_def() if not field_def: return field_arg_def = field_def.args.get(node.name.value) ...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/known_argument_names.py
26
70
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,305
__init__
def __init__(self, context): self.defined_variable_names = set() super(NoUndefinedVariables, self).__init__(context)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_undefined_variables.py
8
10
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,306
undefined_var_message
def undefined_var_message(var_name, op_name=None): if op_name: return 'Variable "${}" is not defined by operation "{}".'.format( var_name, op_name ) return 'Variable "${}" is not defined.'.format(var_name)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_undefined_variables.py
13
18
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,307
enter_OperationDefinition
def enter_OperationDefinition(self, operation, key, parent, path, ancestors): self.defined_variable_names = set()
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_undefined_variables.py
20
21
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,308
leave_OperationDefinition
def leave_OperationDefinition(self, operation, key, parent, path, ancestors): usages = self.context.get_recursive_variable_usages(operation) for variable_usage in usages: node = variable_usage.node var_name = node.name.value if var_name not in self.defined_variable_n...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_undefined_variables.py
23
33
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,309
enter_VariableDefinition
def enter_VariableDefinition(self, node, key, parent, path, ancestors): self.defined_variable_names.add(node.variable.name.value)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_undefined_variables.py
35
36
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,310
__init__
def __init__(self, context): self.variable_definitions = [] super(NoUnusedVariables, self).__init__(context)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_unused_variables.py
8
10
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,311
enter_OperationDefinition
def enter_OperationDefinition(self, node, key, parent, path, ancestors): self.variable_definitions = []
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_unused_variables.py
12
13
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,312
leave_OperationDefinition
def leave_OperationDefinition(self, operation, key, parent, path, ancestors): variable_name_used = set() usages = self.context.get_recursive_variable_usages(operation) op_name = operation.name and operation.name.value or None for variable_usage in usages: variable_name_used....
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_unused_variables.py
15
28
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,313
enter_VariableDefinition
def enter_VariableDefinition(self, node, key, parent, path, ancestors): self.variable_definitions.append(node)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_unused_variables.py
30
31
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,314
unused_variable_message
def unused_variable_message(variable_name, op_name): if op_name: return 'Variable "${}" is never used in operation "{}".'.format(variable_name, op_name) return 'Variable "${}" is never used.'.format(variable_name)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_unused_variables.py
34
37
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,315
enter_Field
def enter_Field(self, node, key, parent, path, ancestors): type = self.context.get_type() if not type: return if is_leaf_type(get_named_type(type)): if node.selection_set: self.context.report_error(GraphQLError( self.no_subselection_a...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/scalar_leafs.py
8
25
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,316
no_subselection_allowed_message
def no_subselection_allowed_message(field, type): return 'Field "{}" of type "{}" must not have a sub selection.'.format(field, type)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/scalar_leafs.py
28
29
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,317
required_subselection_message
def required_subselection_message(field, type): return 'Field "{}" of type "{}" must have a sub selection.'.format(field, type)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/scalar_leafs.py
32
33
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,318
leave_Field
def leave_Field(self, node, key, parent, path, ancestors): field_def = self.context.get_field_def() if not field_def: return False arg_asts = node.arguments or [] arg_ast_map = {arg.name.value: arg for arg in arg_asts} for arg_name, arg_def in field_def.args.items()...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/provided_non_null_arguments.py
8
22
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,319
leave_Directive
def leave_Directive(self, node, key, parent, path, ancestors): directive_def = self.context.get_directive() if not directive_def: return False arg_asts = node.arguments or [] arg_ast_map = {arg.name.value: arg for arg in arg_asts} for arg_name, arg_def in directive_...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/provided_non_null_arguments.py
24
38
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,320
missing_field_arg_message
def missing_field_arg_message(name, arg_name, type): return 'Field "{}" argument "{}" of type "{}" is required but not provided.'.format(name, arg_name, type)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/provided_non_null_arguments.py
41
42
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,321
missing_directive_arg_message
def missing_directive_arg_message(name, arg_name, type): return 'Directive "{}" argument "{}" of type "{}" is required but not provided.'.format(name, arg_name, type)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/provided_non_null_arguments.py
45
46
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,322
__init__
def __init__(self, context): super(OverlappingFieldsCanBeMerged, self).__init__(context) # A memoization for when two fragments are compared "between" each other for # conflicts. Two fragments may be compared many times, so memoizing this can # dramatically improve the performance of thi...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
19
29
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,323
leave_SelectionSet
def leave_SelectionSet(self, node, key, parent, path, ancestors): # Note: we validate on the reverse traversal so deeper conflicts will be # caught first, for correct calculation of mutual exclusivity and for # clearer error messages. # field_map = _collect_field_asts_and_defs( #...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
31
50
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,324
same_type
def same_type(type1, type2): return is_equal_type(type1, type2) # return type1.is_same_type(type2)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
53
55
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,325
fields_conflict_message
def fields_conflict_message(cls, reason_name, reason): return ( 'Fields "{}" conflict because {}. ' 'Use different aliases on the fields to fetch both if this was ' 'intentional.' ).format(reason_name, cls.reason_message(reason))
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
58
63
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,326
reason_message
def reason_message(cls, reason): if isinstance(reason, list): return ' and '.join('subfields "{}" conflict because {}'.format(reason_name, cls.reason_message(sub_reason)) for reason_name, sub_reason in reason) return reason
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
66
71
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,327
_find_conflicts_within_selection_set
def _find_conflicts_within_selection_set(context, cached_fields_and_fragment_names, compared_fragments, parent_type, selection_set): """Find all conflicts found "within" a selection set, including those found via spreading in fragments. Called when visiting each Sele...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
126
175
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,328
_collect_conflicts_between_fields_and_fragment
def _collect_conflicts_between_fields_and_fragment(context, conflicts, cached_fields_and_fragment_names, compared_fragments, are_mutually_exclusive, field_map, fragment_name): fragment = context.get_fragment(fragm...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
178
200
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,329
_collect_conflicts_between_fragments
def _collect_conflicts_between_fragments(context, conflicts, cached_fields_and_fragment_names, compared_fragments, are_mutually_exclusive, fragment_name1, fragment_name2): fragment1 = context.get_fragment(fragment_name1) fragment2 = context.get_fragment(fragment_name2) ...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
205
245
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,330
_find_conflicts_between_sub_selection_sets
def _find_conflicts_between_sub_selection_sets(context, cached_fields_and_fragment_names, compared_fragments, are_mutually_exclusive, parent_type1, selection_set1, parent_type2, selection_set2): """Find all conflicts found...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
248
292
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,331
_collect_conflicts_within
def _collect_conflicts_within(context, conflicts, cached_fields_and_fragment_names, compared_fragments, field_map): """Collect all Conflicts "within" one collection of fields.""" # field map is a keyed collection, where each key represents a response # name and the value at that key is a list of all fields...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
295
312
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,332
_collect_conflicts_between
def _collect_conflicts_between(context, conflicts, cached_fields_and_fragment_names, compared_fragments, parent_fields_are_mutually_exclusive, field_map1, field_map2): """Collect all Conflicts between two collections of fields. This is similar to, but different from the `colle...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
315
338
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,333
_find_conflict
def _find_conflict(context, cached_fields_and_fragment_names, compared_fragments, parent_fields_are_mutually_exclusive, response_name, field1, field2): """Determines if there is a conflict between two particular fields.""" parent_type1, ast1, def1 = field1 parent_type2, ast2, def2 = field...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
341
407
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,334
_get_fields_and_fragments_names
def _get_fields_and_fragments_names(context, cached_fields_and_fragment_names, parent_type, selection_set): cached = cached_fields_and_fragment_names.get(selection_set) if not cached: ast_and_defs = OrderedDict() fragment_names = OrderedDict() _collect_fields_and_fragment_names(context,...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
410
420
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,335
_get_referenced_fields_and_fragment_names
def _get_referenced_fields_and_fragment_names(context, cached_fields_and_fragment_names, fragment): """Given a reference to a fragment, return the represented collection of fields as well as a list of nested fragment names referenced via fragment spreads.""" # Short-circuit building a type from the AST if ...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
423
436
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,336
_collect_fields_and_fragment_names
def _collect_fields_and_fragment_names(context, parent_type, selection_set, ast_and_defs, fragment_names): for selection in selection_set.selections: if isinstance(selection, ast.Field): field_name = selection.name.value if isinstance(parent_type, (GraphQLObjectType, GraphQLInterfac...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
439
466
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,337
_subfield_conflicts
def _subfield_conflicts(conflicts, response_name, ast1, ast2): """Given a series of Conflicts which occurred between two sub-fields, generate a single Conflict.""" if conflicts: return ( (response_name, [conflict[0] for conflict in conflicts]), tuple(itertools.chain([ast1], *[con...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
469
476
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,338
do_types_conflict
def do_types_conflict(type1, type2): if isinstance(type1, GraphQLList): if isinstance(type2, GraphQLList): return do_types_conflict(type1.of_type, type2.of_type) return True if isinstance(type2, GraphQLList): if isinstance(type1, GraphQLList): return do_types_con...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
479
503
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,339
_same_value
def _same_value(value1, value2): return (not value1 and not value2) or print_ast(value1) == print_ast(value2)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
506
507
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,340
_same_arguments
def _same_arguments(arguments1, arguments2): # Check to see if they are empty arguments or nones. If they are, we can # bail out early. if not (arguments1 or arguments2): return True if len(arguments1) != len(arguments2): return False arguments2_values_to_arg = {a.name.value: a for...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/overlapping_fields_can_be_merged.py
510
529
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,341
__init__
def __init__(self, context): super(VariablesInAllowedPosition, self).__init__(context) self.var_def_map = {}
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/variables_in_allowed_position.py
11
13
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,342
enter_OperationDefinition
def enter_OperationDefinition(self, node, key, parent, path, ancestors): self.var_def_map = {}
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/variables_in_allowed_position.py
15
16
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,343
leave_OperationDefinition
def leave_OperationDefinition(self, operation, key, parent, path, ancestors): usages = self.context.get_recursive_variable_usages(operation) for usage in usages: node = usage.node type = usage.type var_name = node.name.value var_def = self.var_def_map.get...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/variables_in_allowed_position.py
18
38
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,344
enter_VariableDefinition
def enter_VariableDefinition(self, node, key, parent, path, ancestors): self.var_def_map[node.variable.name.value] = node
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/variables_in_allowed_position.py
40
41
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,345
effective_type
def effective_type(var_type, var_def): if not var_def.default_value or isinstance(var_type, GraphQLNonNull): return var_type return GraphQLNonNull(var_type)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/variables_in_allowed_position.py
44
48
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,346
bad_var_pos_message
def bad_var_pos_message(var_name, var_type, expected_type): return 'Variable "{}" of type "{}" used in position expecting type "{}".'.format(var_name, var_type, expected_type)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/variables_in_allowed_position.py
51
53
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,347
__init__
def __init__(self, context): super(UniqueInputFieldNames, self).__init__(context) self.known_names = {} self.known_names_stack = []
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_input_field_names.py
8
11
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,348
enter_ObjectValue
def enter_ObjectValue(self, node, key, parent, path, ancestors): self.known_names_stack.append(self.known_names) self.known_names = {}
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_input_field_names.py
13
15
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,349
leave_ObjectValue
def leave_ObjectValue(self, node, key, parent, path, ancestors): self.known_names = self.known_names_stack.pop()
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_input_field_names.py
17
18
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,350
enter_ObjectField
def enter_ObjectField(self, node, key, parent, path, ancestors): field_name = node.name.value if field_name in self.known_names: self.context.report_error(GraphQLError( self.duplicate_input_field_message(field_name), [self.known_names[field_name], node.name] ...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_input_field_names.py
20
29
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,351
duplicate_input_field_message
def duplicate_input_field_message(field_name): return 'There can only be one input field named "{}".'.format(field_name)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/unique_input_field_names.py
32
33
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,352
__init__
def __init__(self, context): super(NoFragmentCycles, self).__init__(context) self.errors = [] self.visited_frags = set() self.spread_path = [] self.spread_path_index_by_name = {}
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_fragment_cycles.py
8
13
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,353
enter_OperationDefinition
def enter_OperationDefinition(self, node, key, parent, path, ancestors): return False
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_fragment_cycles.py
15
16
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,354
enter_FragmentDefinition
def enter_FragmentDefinition(self, node, key, parent, path, ancestors): if node.name.value not in self.visited_frags: self.detect_cycle_recursive(node) return False
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_fragment_cycles.py
18
21
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,355
detect_cycle_recursive
def detect_cycle_recursive(self, fragment): fragment_name = fragment.name.value self.visited_frags.add(fragment_name) spread_nodes = self.context.get_fragment_spreads(fragment.selection_set) if not spread_nodes: return self.spread_path_index_by_name[fragment_name] =...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_fragment_cycles.py
23
54
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,356
cycle_error_message
def cycle_error_message(fragment_name, spread_names): via = ' via {}'.format(', '.join(spread_names)) if spread_names else '' return 'Cannot spread fragment "{}" within itself{}.'.format(fragment_name, via)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/no_fragment_cycles.py
57
59
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,357
_undefined_field_message
def _undefined_field_message(field_name, type, suggested_types, suggested_fields): message = 'Cannot query field "{}" on type "{}".'.format(field_name, type) if suggested_types: suggestions = quoted_or_list(suggested_types) message += " Did you mean to use an inline...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/fields_on_correct_type.py
19
30
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,358
enter_Field
def enter_Field(self, node, key, parent, path, ancestors): parent_type = self.context.get_parent_type() if not parent_type: return field_def = self.context.get_field_def() if not field_def: # This field doesn't exist, lets look for suggestions. schem...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/fields_on_correct_type.py
44
64
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,359
get_suggested_type_names
def get_suggested_type_names(schema, output_type, field_name): '''Go through all of the implementations of type, as well as the interfaces that they implement. If any of those types include the provided field, suggest them, sorted by how often the type is referenced, starting with Interfaces.''' ...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/fields_on_correct_type.py
67
100
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,360
get_suggested_field_names
def get_suggested_field_names(schema, graphql_type, field_name): '''For the field name provided, determine if there are any similar field names that may be the result of a typo.''' if isinstance(graphql_type, (GraphQLInterfaceType, GraphQLObjectType)): possible_field_names = list(graphql_type.field...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/fields_on_correct_type.py
103
113
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,361
__init__
def __init__(self, context): self.context = context
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/base.py
7
8
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,362
enter_VariableDefinition
def enter_VariableDefinition(self, node, key, parent, path, ancestors): type = type_from_ast(self.context.get_schema(), node.type) if type and not is_input_type(type): self.context.report_error(GraphQLError( self.non_input_type_on_variable_message(node.variable.name.value, p...
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/variables_are_input_types.py
10
17
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,363
non_input_type_on_variable_message
def non_input_type_on_variable_message(variable_name, type_name): return 'Variable "${}" cannot be non-input type "{}".'.format(variable_name, type_name)
python
wandb/vendor/graphql-core-1.1/wandb_graphql/validation/rules/variables_are_input_types.py
20
21
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,364
path_split
def path_split(pathname_spec, separator=os.path.sep): """ Splits a pathname specification separated by an OS-dependent separator. :param pathname_spec: The pathname specification. :param separator: (OS Dependent) `:` on Unix and `;` on Windows or user-specified. """ return list(...
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/watchmedo.py
50
59
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,365
add_to_sys_path
def add_to_sys_path(pathnames, index=0): """ Adds specified paths at specified index into the sys.path list. :param paths: A list of paths to add to the sys.path :param index: (Default 0) The index in the sys.path list where the paths will be added. """ for pathname in p...
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/watchmedo.py
62
73
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,366
load_config
def load_config(tricks_file_pathname): """ Loads the YAML configuration from the specified file. :param tricks_file_path: The path to the tricks configuration file. :returns: A dictionary of configuration information. """ f = open(tricks_file_pathname, 'rb') content = f.read...
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/watchmedo.py
76
89
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,367
parse_patterns
def parse_patterns(patterns_spec, ignore_patterns_spec, separator=';'): """ Parses pattern argument specs and returns a two-tuple of (patterns, ignore_patterns). """ patterns = patterns_spec.split(separator) ignore_patterns = ignore_patterns_spec.split(separator) if ignore_patterns == ['']: ...
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/watchmedo.py
92
101
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,368
observe_with
def observe_with(observer, event_handler, pathnames, recursive): """ Single observer thread with a scheduled path and event handler. :param observer: The observer thread. :param event_handler: Event handler which will be called in response to file system events. :param pathnames: ...
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/watchmedo.py
104
125
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,369
schedule_tricks
def schedule_tricks(observer, tricks, pathname, recursive): """ Schedules tricks with the specified observer and for the given watch path. :param observer: The observer thread into which to schedule the trick and watch. :param tricks: A list of tricks. :param pathname: A...
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/watchmedo.py
128
147
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,370
tricks_from
def tricks_from(args): """ Subcommand to execute tricks from a tricks configuration file. :param args: Command line argument options. """ from watchdog.observers import Observer add_to_sys_path(path_split(args.python_path)) observers = [] for tricks_file in args.files: ...
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/watchmedo.py
166
209
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,371
tricks_generate_yaml
def tricks_generate_yaml(args): """ Subcommand to generate Yaml configuration for tricks named on the command line. :param args: Command line argument options. """ python_paths = path_split(args.python_path) add_to_sys_path(python_paths) output = StringIO() for trick_path i...
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/watchmedo.py
230
261
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,372
log
def log(args): """ Subcommand to log file system events to the console. :param args: Command line argument options. """ from watchdog.utils import echo from watchdog.tricks import LoggerTrick if args.trace: echo.echo_class(LoggerTrick) patterns, ignore_patterns =\ ...
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/watchmedo.py
317
354
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,373
shell_command
def shell_command(args): """ Subcommand to execute shell commands in response to file system events. :param args: Command line argument options. """ from watchdog.tricks import ShellCommandTrick if not args.command: args.command = None if args.debug_force_polling: ...
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/watchmedo.py
425
451
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,374
auto_restart
def auto_restart(args): """ Subcommand to start a long-running subprocess and restart it on matched events. :param args: Command line argument options. """ from watchdog.observers import Observer from watchdog.tricks import AutoRestartTrick import signal import re if no...
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/watchmedo.py
509
551
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,375
handle_sigterm
def handle_sigterm(_signum, _frame): raise KeyboardInterrupt()
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/watchmedo.py
533
534
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,376
main
def main(): """Entry-point function.""" parser.dispatch()
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/watchmedo.py
571
573
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,377
__init__
def __init__(self, src_path): self._src_path = src_path
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
117
118
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,378
src_path
def src_path(self): """Source path of the file system object that triggered this event.""" return self._src_path
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
121
123
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,379
__str__
def __str__(self): return self.__repr__()
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
125
126
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,380
__repr__
def __repr__(self): return ("<%(class_name)s: event_type=%(event_type)s, " "src_path=%(src_path)r, " "is_directory=%(is_directory)s>" ) % (dict( class_name=self.__class__.__name__, event_type=self.event_type, ...
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
128
136
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,381
key
def key(self): return (self.event_type, self.src_path, self.is_directory)
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
140
141
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,382
__eq__
def __eq__(self, event): return self.key == event.key
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
143
144
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,383
__ne__
def __ne__(self, event): return self.key != event.key
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
146
147
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,384
__hash__
def __hash__(self): return hash(self.key)
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
149
150
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,385
__init__
def __init__(self, src_path, dest_path): super(FileSystemMovedEvent, self).__init__(src_path) self._dest_path = dest_path
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
160
162
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,386
dest_path
def dest_path(self): """The destination path of the move event.""" return self._dest_path
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
165
167
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,387
key
def key(self): return (self.event_type, self.src_path, self.dest_path, self.is_directory)
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
171
172
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,388
__repr__
def __repr__(self): return ("<%(class_name)s: src_path=%(src_path)r, " "dest_path=%(dest_path)r, " "is_directory=%(is_directory)s>" ) % (dict(class_name=self.__class__.__name__, src_path=self.src_path, dest_path=...
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
174
181
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,389
__init__
def __init__(self, src_path): super(FileDeletedEvent, self).__init__(src_path)
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
192
193
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,390
__repr__
def __repr__(self): return "<%(class_name)s: src_path=%(src_path)r>" %\ dict(class_name=self.__class__.__name__, src_path=self.src_path)
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
195
198
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,391
__init__
def __init__(self, src_path): super(FileModifiedEvent, self).__init__(src_path)
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
206
207
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,392
__repr__
def __repr__(self): return ("<%(class_name)s: src_path=%(src_path)r>" ) % (dict(class_name=self.__class__.__name__, src_path=self.src_path))
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
209
212
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,393
__init__
def __init__(self, src_path): super(FileCreatedEvent, self).__init__(src_path)
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
220
221
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,394
__repr__
def __repr__(self): return ("<%(class_name)s: src_path=%(src_path)r>" ) % (dict(class_name=self.__class__.__name__, src_path=self.src_path))
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
223
226
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,395
__init__
def __init__(self, src_path, dest_path): super(FileMovedEvent, self).__init__(src_path, dest_path)
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
232
233
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,396
__repr__
def __repr__(self): return ("<%(class_name)s: src_path=%(src_path)r, " "dest_path=%(dest_path)r>" ) % (dict(class_name=self.__class__.__name__, src_path=self.src_path, dest_path=self.dest_path))
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
235
240
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,397
__init__
def __init__(self, src_path): super(DirDeletedEvent, self).__init__(src_path)
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
252
253
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,398
__repr__
def __repr__(self): return ("<%(class_name)s: src_path=%(src_path)r>" ) % (dict(class_name=self.__class__.__name__, src_path=self.src_path))
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
255
258
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,399
__init__
def __init__(self, src_path): super(DirModifiedEvent, self).__init__(src_path)
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
269
270
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
6,400
__repr__
def __repr__(self): return ("<%(class_name)s: src_path=%(src_path)r>" ) % (dict(class_name=self.__class__.__name__, src_path=self.src_path))
python
wandb/vendor/watchdog_0_9_0/wandb_watchdog/events.py
272
275
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }