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,070,501
get_field_entry_key
def get_field_entry_key(node: FieldNode) -> str: """Implements the logic to compute the key of a given field's entry""" return node.alias.value if node.alias else node.name.value
python
python-3.10.8.amd64/Lib/site-packages/graphql/execution/collect_fields.py
172
174
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,502
suggestion_list
def suggestion_list(input_: str, options: Collection[str]) -> List[str]: """Get list with suggestions for a given input. Given an invalid input string and list of valid options, returns a filtered list of valid options sorted based on their similarity with the input. """ options_by_distance = {} ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/suggestion_list.py
8
30
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,503
__init__
def __init__(self, input_: str): self._input = input_ self._input_lower_case = input_.lower() row_size = len(input_) + 1 self._input_list = list(map(ord, self._input_lower_case)) self._rows = [[0] * row_size, [0] * row_size, [0] * row_size]
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/suggestion_list.py
48
54
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,504
measure
def measure(self, option: str, threshold: int) -> Optional[int]: if self._input == option: return 0 option_lower_case = option.lower() # Any case change counts as a single edit if self._input_lower_case == option_lower_case: return 1 a, b = list(map(ord...
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/suggestion_list.py
56
109
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,505
__delitem__
def __delitem__(self, key): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_dict.py
19
20
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,506
__setitem__
def __setitem__(self, key, value): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_dict.py
22
23
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,507
__iadd__
def __iadd__(self, value): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_dict.py
25
26
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,508
__hash__
def __hash__(self): return hash(tuple(self.items()))
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_dict.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,070,509
__copy__
def __copy__(self) -> "FrozenDict": return FrozenDict(self)
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_dict.py
31
32
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,510
__deepcopy__
def __deepcopy__(self, memo: Dict) -> "FrozenDict": return FrozenDict({k: deepcopy(v, memo) for k, v in self.items()})
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_dict.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,070,511
clear
def clear(self): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_dict.py
39
40
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,512
pop
def pop(self, key, default=None): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_dict.py
42
43
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,513
popitem
def popitem(self): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_dict.py
45
46
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,514
setdefault
def setdefault(self, key, default=None): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_dict.py
48
49
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,515
update
def update(self, other=None): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_dict.py
51
52
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,516
isinstance
def isinstance(cls, obj: Any) -> bool: return isinstance(obj, cls.bases)
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/description.py
23
24
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,517
register
def register(cls, base: type) -> None: """Register a class that shall be accepted as a description.""" if not isinstance(base, type): raise TypeError("Only types can be registered.") if base is object: cls.bases = object elif cls.bases is object: cls.b...
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/description.py
27
39
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,518
unregister
def unregister(cls, base: type) -> None: """Unregister a class that shall no more be accepted as a description.""" if not isinstance(base, type): raise TypeError("Only types can be unregistered.") if isinstance(cls.bases, tuple): if base in cls.bases: cls....
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/description.py
42
54
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,519
camel_to_snake
def camel_to_snake(s: str) -> str: """Convert from CamelCase to snake_case""" return _re_camel_to_snake.sub(r"\1_", s).lower()
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/convert_case.py
11
13
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,520
snake_to_camel
def snake_to_camel(s: str, upper: bool = True) -> str: """Convert from snake_case to CamelCase If upper is set, then convert to upper CamelCase, otherwise the first character keeps its case. """ s = _re_snake_to_camel.sub(lambda m: m.group(2).upper(), s) if upper: s = s[:1].upper() + s[...
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/convert_case.py
16
25
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,521
__init__
def __init__(self, func: Callable) -> None: self.__doc__ = getattr(func, "__doc__") self.func = func
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/cached_property.py
23
25
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,522
__get__
def __get__(self, obj: object, cls: type) -> Any: if obj is None: return self value = obj.__dict__[self.func.__name__] = self.func(obj) return value
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/cached_property.py
27
31
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,523
__init__
def __init__(self) -> None: self.subscribers = set()
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/simple_pub_sub.py
24
25
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,524
emit
def emit(self, event: Any) -> bool: """Emit an event.""" for subscriber in self.subscribers: result = subscriber(event) if isawaitable(result): ensure_future(result) return bool(self.subscribers)
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/simple_pub_sub.py
27
33
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,525
get_subscriber
def get_subscriber( self, transform: Optional[Callable] = None ) -> "SimplePubSubIterator": return SimplePubSubIterator(self, transform)
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/simple_pub_sub.py
35
38
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,526
__init__
def __init__(self, pubsub: SimplePubSub, transform: Optional[Callable]) -> None: self.pubsub = pubsub self.transform = transform self.pull_queue: Queue[Future] = Queue() self.push_queue: Queue[Any] = Queue() self.listening = True pubsub.subscribers.add(self.push_value)
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/simple_pub_sub.py
42
48
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,527
__aiter__
def __aiter__(self) -> "SimplePubSubIterator": return self
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/simple_pub_sub.py
50
51
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,528
__anext__
async def __anext__(self) -> Any: if not self.listening: raise StopAsyncIteration await sleep(0) if not self.push_queue.empty(): return await self.push_queue.get() future = get_running_loop().create_future() await self.pull_queue.put(future) return...
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/simple_pub_sub.py
53
61
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,529
aclose
async def aclose(self) -> None: if self.listening: await self.empty_queue()
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/simple_pub_sub.py
63
65
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,530
empty_queue
async def empty_queue(self) -> None: self.listening = False self.pubsub.subscribers.remove(self.push_value) while not self.pull_queue.empty(): future = await self.pull_queue.get() future.cancel() while not self.push_queue.empty(): await self.push_queue...
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/simple_pub_sub.py
67
74
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,531
push_value
async def push_value(self, event: Any) -> None: value = event if self.transform is None else self.transform(event) if self.pull_queue.empty(): await self.push_queue.put(value) else: (await self.pull_queue.get()).set_result(value)
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/simple_pub_sub.py
76
81
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,532
merge_kwargs
def merge_kwargs(base_dict: T, **kwargs: Any) -> T: """Return arbitrary typed dictionary with some keyword args merged in.""" return cast(T, {**cast(Dict, base_dict), **kwargs})
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/merge_kwargs.py
6
8
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,533
group_by
def group_by(items: Collection[T], key_fn: Callable[[T], K]) -> Dict[K, List[T]]: """Group an unsorted collection of items by a key derived via a function.""" result: Dict[K, List[T]] = defaultdict(list) for item in items: key = key_fn(item) result[key].append(item) return result
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/group_by.py
10
16
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,534
print_path_list
def print_path_list(path: Collection[Union[str, int]]) -> str: """Build a string describing the path.""" return "".join(f"[{key}]" if isinstance(key, int) else f".{key}" for key in path)
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/print_path_list.py
4
6
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,535
inspect
def inspect(value: Any) -> str: """Inspect value and a return string representation for error messages. Used to print values in error messages. We do not use repr() in order to not leak too much of the inner Python representation of unknown objects, and we do not use json.dumps() because not all object...
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/inspect.py
23
34
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,536
inspect_recursive
def inspect_recursive(value: Any, seen_values: List) -> str: if value is None or value is Undefined or isinstance(value, (bool, float, complex)): return repr(value) if isinstance(value, (int, str, bytes, bytearray)): return trunc_str(repr(value)) if len(seen_values) < max_recursive_depth and...
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/inspect.py
37
155
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,537
trunc_str
def trunc_str(s: str) -> str: """Truncate strings to maximum length.""" if len(s) > max_str_size: i = max(0, (max_str_size - 3) // 2) j = max(0, max_str_size - 3 - i) s = s[:i] + "..." + s[-j:] return s
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/inspect.py
158
164
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,538
trunc_list
def trunc_list(s: List) -> List: """Truncate lists to maximum length.""" if len(s) > max_list_size: i = max_list_size // 2 j = i - 1 s = s[:i] + [ELLIPSIS] + s[-j:] return s
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/inspect.py
167
173
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,539
is_collection
def is_collection(value: Any) -> bool: """Check if value is a collection, but not a string or a mapping.""" return isinstance(value, collection_types) and not isinstance( value, not_iterable_types )
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/is_iterable.py
20
24
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,540
is_iterable
def is_iterable(value: Any) -> bool: """Check if value is an iterable, but not a string or a mapping.""" return isinstance(value, iterable_types) and not isinstance( value, not_iterable_types )
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/is_iterable.py
27
31
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,541
__repr__
def __repr__(self) -> str: return "Undefined"
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/undefined.py
9
10
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,542
__hash__
def __hash__(self) -> int: return hash(UndefinedType)
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/undefined.py
14
15
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,543
__bool__
def __bool__(self) -> bool: return False
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/undefined.py
17
18
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,544
__eq__
def __eq__(self, other: Any) -> bool: return other is Undefined
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/undefined.py
20
21
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,545
__ne__
def __ne__(self, other: Any) -> bool: return not self == other
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/undefined.py
23
24
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,546
did_you_mean
def did_you_mean(suggestions: Sequence[str], sub_message: Optional[str] = None) -> str: """Given [ A, B, C ] return ' Did you mean A, B, or C?'""" if not suggestions or not MAX_LENGTH: return "" parts = [" Did you mean "] if sub_message: parts.extend([sub_message, " "]) suggestions =...
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/did_you_mean.py
8
28
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,547
natural_comparison_key
def natural_comparison_key(key: str) -> Tuple: """Comparison key function for sorting strings by natural sort order. See: https://en.wikipedia.org/wiki/Natural_sort_order """ return tuple( (int(part), part) if is_digit else part for part, is_digit in zip(_re_digits.split(key), cycle((Fa...
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/natural_compare.py
11
19
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,548
is_awaitable
def is_awaitable(value: Any) -> bool: """Return true if object can be passed to an ``await`` expression. Instead of testing if the object is an instance of abc.Awaitable, it checks the existence of an `__await__` attribute. This is much faster. """ return ( # check for coroutine objects ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/is_awaitable.py
10
24
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,549
add_key
def add_key(self, key: Union[str, int], typename: Optional[str] = None) -> "Path": """Return a new Path containing the given key.""" return Path(self, key, typename)
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/path.py
16
18
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,550
as_list
def as_list(self) -> List[Union[str, int]]: """Return a list of the path keys.""" flattened: List[Union[str, int]] = [] append = flattened.append curr: Path = self while curr: append(curr.key) curr = curr.prev return flattened[::-1]
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/path.py
20
28
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,551
__delitem__
def __delitem__(self, key): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.py
19
20
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,552
__setitem__
def __setitem__(self, key, value): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.py
22
23
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,553
__add__
def __add__(self, value): if isinstance(value, tuple): value = list(value) return list.__add__(self, value)
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.py
25
28
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,554
__iadd__
def __iadd__(self, value): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.py
30
31
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,555
__mul__
def __mul__(self, value): return list.__mul__(self, value)
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.py
33
34
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,556
__imul__
def __imul__(self, value): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.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,070,557
__hash__
def __hash__(self): return hash(tuple(self))
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.py
39
40
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,558
__copy__
def __copy__(self) -> "FrozenList": return FrozenList(self)
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.py
42
43
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,559
__deepcopy__
def __deepcopy__(self, memo: Dict) -> "FrozenList": return FrozenList(deepcopy(value, memo) for value in self)
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.py
45
46
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,560
append
def append(self, x): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.py
48
49
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,561
extend
def extend(self, iterable): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.py
51
52
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,562
insert
def insert(self, i, x): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.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,070,563
remove
def remove(self, x): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.py
57
58
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,564
pop
def pop(self, i=None): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.py
60
61
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,565
clear
def clear(self): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.py
63
64
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,566
sort
def sort(self, *, key=None, reverse=False): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.py
66
67
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,567
reverse
def reverse(self): raise FrozenError
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/frozen_list.py
69
70
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,568
identity_func
def identity_func(x: T = cast(Any, Undefined), *_args: Any) -> T: """Return the first received argument.""" return x
python
python-3.10.8.amd64/Lib/site-packages/graphql/pyutils/identity_func.py
11
13
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,569
__init__
def __init__(self, source: "Source", position: int, description: str) -> None: super().__init__( f"Syntax Error: {description}", source=source, positions=[position] ) self.description = description
python
python-3.10.8.amd64/Lib/site-packages/graphql/error/syntax_error.py
14
18
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,570
located_error
def located_error( original_error: Exception, nodes: Optional[Union["None", Collection["Node"]]] = None, path: Optional[Collection[Union[str, int]]] = None, ) -> GraphQLError: """Located GraphQL Error Given an arbitrary Exception, presumably thrown while attempting to execute a GraphQL operatio...
python
python-3.10.8.amd64/Lib/site-packages/graphql/error/located_error.py
12
50
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,571
__init__
def __init__( self, message: str, nodes: Union[Collection["Node"], "Node", None] = None, source: Optional["Source"] = None, positions: Optional[Collection[int]] = None, path: Optional[Collection[Union[str, int]]] = None, original_error: Optional[Exception] = None,...
python
python-3.10.8.amd64/Lib/site-packages/graphql/error/graphql_error.py
115
170
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,572
__str__
def __str__(self) -> str: # Lazy import to avoid a cyclic dependency between error and language from ..language.print_location import print_location, print_source_location output = [self.message] if self.nodes: for node in self.nodes: if node.loc: ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/error/graphql_error.py
172
187
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,573
__repr__
def __repr__(self) -> str: args = [repr(self.message)] if self.locations: args.append(f"locations={self.locations!r}") if self.path: args.append(f"path={self.path!r}") if self.extensions: args.append(f"extensions={self.extensions!r}") return f"...
python
python-3.10.8.amd64/Lib/site-packages/graphql/error/graphql_error.py
189
197
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,574
__eq__
def __eq__(self, other: Any) -> bool: return ( isinstance(other, GraphQLError) and self.__class__ == other.__class__ and all( getattr(self, slot) == getattr(other, slot) for slot in self.__slots__ if slot != "original_error" ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/error/graphql_error.py
199
216
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,575
__ne__
def __ne__(self, other: Any) -> bool: return not self == other
python
python-3.10.8.amd64/Lib/site-packages/graphql/error/graphql_error.py
218
219
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,576
formatted
def formatted(self) -> GraphQLFormattedError: """Get error formatted according to the specification. Given a GraphQLError, format it according to the rules described by the "Response Format, Errors" section of the GraphQL Specification. """ formatted: GraphQLFormattedError = { ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/error/graphql_error.py
222
237
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,577
print_error
def print_error(error: GraphQLError) -> str: """Print a GraphQLError to a string. Represents useful location information about the error's position in the source. .. deprecated:: 3.2 Please use ``str(error)`` instead. Will be removed in v3.3. """ if not isinstance(error, GraphQLError): ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/error/graphql_error.py
240
250
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,578
format_error
def format_error(error: GraphQLError) -> GraphQLFormattedError: """Format a GraphQL error. Given a GraphQLError, format it according to the rules described by the "Response Format, Errors" section of the GraphQL Specification. .. deprecated:: 3.2 Please use ``error.formatted`` instead. Will be ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/error/graphql_error.py
253
264
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,579
__init__
def __init__(self, type_info: TypeInfo): super().__init__() self.usages = [] self._append_usage = self.usages.append self._type_info = type_info
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
49
53
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,580
enter_variable_definition
def enter_variable_definition(self, *_args: Any) -> VisitorAction: return self.SKIP
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
55
56
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,581
enter_variable
def enter_variable(self, node: VariableNode, *_args: Any) -> VisitorAction: type_info = self._type_info usage = VariableUsage( node, type_info.get_input_type(), type_info.get_default_value() ) self._append_usage(usage) return None
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
58
64
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,582
__init__
def __init__( self, ast: DocumentNode, on_error: Callable[[GraphQLError], None] ) -> None: self.document = ast self.on_error = on_error # type: ignore self._fragments = None self._fragment_spreads = {} self._recursively_referenced_fragments = {}
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
83
90
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,583
on_error
def on_error(self, error: GraphQLError) -> None: pass
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
92
93
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,584
report_error
def report_error(self, error: GraphQLError) -> None: self.on_error(error)
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
95
96
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,585
get_fragment
def get_fragment(self, name: str) -> Optional[FragmentDefinitionNode]: fragments = self._fragments if fragments is None: fragments = { statement.name.value: statement for statement in self.document.definitions if isinstance(statement, FragmentD...
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
98
108
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,586
get_fragment_spreads
def get_fragment_spreads(self, node: SelectionSetNode) -> List[FragmentSpreadNode]: spreads = self._fragment_spreads.get(node) if spreads is None: spreads = [] append_spread = spreads.append sets_to_visit = [node] append_set = sets_to_visit.append ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
110
130
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,587
get_recursively_referenced_fragments
def get_recursively_referenced_fragments( self, operation: OperationDefinitionNode ) -> List[FragmentDefinitionNode]: fragments = self._recursively_referenced_fragments.get(operation) if fragments is None: fragments = [] append_fragment = fragments.append ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
132
157
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,588
__init__
def __init__( self, ast: DocumentNode, schema: Optional[GraphQLSchema], on_error: Callable[[GraphQLError], None], ) -> None: super().__init__(ast, on_error) self.schema = schema
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
170
177
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,589
__init__
def __init__( self, schema: GraphQLSchema, ast: DocumentNode, type_info: TypeInfo, on_error: Callable[[GraphQLError], None], ) -> None: super().__init__(ast, on_error) self.schema = schema self._type_info = type_info self._variable_usages = {} ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
194
205
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,590
get_variable_usages
def get_variable_usages(self, node: NodeWithSelectionSet) -> List[VariableUsage]: usages = self._variable_usages.get(node) if usages is None: usage_visitor = VariableUsageVisitor(self._type_info) visit(node, TypeInfoVisitor(self._type_info, usage_visitor)) usages = us...
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
207
214
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,591
get_recursive_variable_usages
def get_recursive_variable_usages( self, operation: OperationDefinitionNode ) -> List[VariableUsage]: usages = self._recursive_variable_usages.get(operation) if usages is None: get_variable_usages = self.get_variable_usages usages = get_variable_usages(operation) ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
216
226
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,592
get_type
def get_type(self) -> Optional[GraphQLOutputType]: return self._type_info.get_type()
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
228
229
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,593
get_parent_type
def get_parent_type(self) -> Optional[GraphQLCompositeType]: return self._type_info.get_parent_type()
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
231
232
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,594
get_input_type
def get_input_type(self) -> Optional[GraphQLInputType]: return self._type_info.get_input_type()
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
234
235
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,595
get_parent_input_type
def get_parent_input_type(self) -> Optional[GraphQLInputType]: return self._type_info.get_parent_input_type()
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
237
238
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,596
get_field_def
def get_field_def(self) -> Optional[GraphQLField]: return self._type_info.get_field_def()
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
240
241
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,597
get_directive
def get_directive(self) -> Optional[GraphQLDirective]: return self._type_info.get_directive()
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
243
244
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,598
get_argument
def get_argument(self) -> Optional[GraphQLArgument]: return self._type_info.get_argument()
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
246
247
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,599
get_enum_value
def get_enum_value(self) -> Optional[GraphQLEnumValue]: return self._type_info.get_enum_value()
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validation_context.py
249
250
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }
6,070,600
validate
def validate( schema: GraphQLSchema, document_ast: DocumentNode, rules: Optional[Collection[Type[ASTValidationRule]]] = None, max_errors: Optional[int] = None, type_info: Optional[TypeInfo] = None, ) -> List[GraphQLError]: """Implements the "Validation" section of the spec. Validation runs ...
python
python-3.10.8.amd64/Lib/site-packages/graphql/validation/validate.py
19
89
{ "name": "PortablePy/3.10.8.0", "url": "https://github.com/PortablePy/3.10.8.0.git", "license": "NOASSERTION", "stars": 0, "forks": 0 }