fname stringlengths 63 176 | rel_fname stringclasses 706
values | line int64 -1 4.5k | name stringlengths 1 81 | kind stringclasses 2
values | category stringclasses 2
values | info stringlengths 0 77.9k ⌀ |
|---|---|---|---|---|---|---|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,664 | scope | ref | function | if inferred_call.parent and isinstance(inferred_call.scope(), nodes.ClassDef):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,669 | qname | ref | function | if inferred_call.qname() == "typing.NamedTuple":
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,672 | add_message | ref | function | self.add_message("not-callable", node=node, args=node.func.as_string())
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,672 | as_string | ref | function | self.add_message("not-callable", node=node, args=node.func.as_string())
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,674 | check_messages | ref | function | @check_messages("invalid-sequence-index")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,675 | visit_extslice | def | function | def visit_extslice(self, node: nodes.ExtSlice) -> None:
if not node.parent or not hasattr(node.parent, "value"):
return None
# Check extended slice objects as if they were used as a sequence
# index to check if the object being sliced can support them
return self._check_i... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,680 | _check_invalid_sequence_index | ref | function | return self._check_invalid_sequence_index(node.parent)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,682 | _check_invalid_slice_index | def | function | def _check_invalid_slice_index(self, node: nodes.Slice) -> None:
# Check the type of each part of the slice
invalid_slices_nodes: List[nodes.NodeNG] = []
for index in (node.lower, node.upper, node.step):
if index is None:
continue
index_type = safe_in... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,689 | safe_infer | ref | function | index_type = safe_infer(index)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,700 | pytype | ref | function | if index_type.pytype() in {"builtins.int", "builtins.NoneType"}:
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,719 | safe_infer | ref | function | inferred = safe_infer(parent.value)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,734 | add_message | ref | function | self.add_message("invalid-slice-index", node=snode)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,736 | check_messages | ref | function | @check_messages("not-context-manager")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,737 | visit_with | def | function | def visit_with(self, node: nodes.With) -> None:
for ctx_mgr, _ in node.items:
context = astroid.context.InferenceContext()
inferred = safe_infer(ctx_mgr, context=context)
if inferred is None or inferred is astroid.Uninferable:
continue
if isin... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,739 | InferenceContext | ref | function | context = astroid.context.InferenceContext()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,740 | safe_infer | ref | function | inferred = safe_infer(ctx_mgr, context=context)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,747 | decorated_with | ref | function | if decorated_with(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,765 | _unflatten | ref | function | None, _unflatten(context.path)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,767 | _flatten_container | ref | function | inferred_paths = _flatten_container(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,768 | safe_infer | ref | function | safe_infer(path) for path in context_path_names
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,773 | scope | ref | function | scope = inferred_path.scope()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,776 | decorated_with | ref | function | if decorated_with(scope, self.config.contextmanager_decorators):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,779 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,790 | has_known_bases | ref | function | if not has_known_bases(inferred):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,797 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,801 | check_messages | ref | function | @check_messages("invalid-unary-operand-type")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,802 | visit_unaryop | def | function | def visit_unaryop(self, node: nodes.UnaryOp) -> None:
"""Detect TypeErrors for unary operands."""
for error in node.type_errors():
# Let the error customize its output.
self.add_message("invalid-unary-operand-type", args=str(error), node=node)
@check_messages("unsupport... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,805 | type_errors | ref | function | for error in node.type_errors():
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,807 | add_message | ref | function | self.add_message("invalid-unary-operand-type", args=str(error), node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,809 | check_messages | ref | function | @check_messages("unsupported-binary-operation")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,810 | visit_binop | def | function | def visit_binop(self, node: nodes.BinOp) -> None:
if node.op == "|":
self._detect_unsupported_alternative_union_syntax(node)
def _detect_unsupported_alternative_union_syntax(self, node: nodes.BinOp) -> None:
"""Detect if unsupported alternative Union syntax (PEP 604) was used."""
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,812 | _detect_unsupported_alternative_union_syntax | ref | function | self._detect_unsupported_alternative_union_syntax(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,814 | _detect_unsupported_alternative_union_syntax | def | function | def _detect_unsupported_alternative_union_syntax(self, node: nodes.BinOp) -> None:
"""Detect if unsupported alternative Union syntax (PEP 604) was used."""
if self._py310_plus: # 310+ supports the new syntax
return
if isinstance(
node.parent, TYPE_ANNOTATION_NODES_T... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,821 | is_postponed_evaluation_enabled | ref | function | ) and not is_postponed_evaluation_enabled(node):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,824 | _check_unsupported_alternative_union_syntax | ref | function | self._check_unsupported_alternative_union_syntax(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,843 | is_postponed_evaluation_enabled | ref | function | if is_postponed_evaluation_enabled(node):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,853 | _check_unsupported_alternative_union_syntax | ref | function | self._check_unsupported_alternative_union_syntax(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,855 | _check_unsupported_alternative_union_syntax | def | function | def _check_unsupported_alternative_union_syntax(self, node: nodes.BinOp) -> None:
"""Check if left or right node is of type `type`."""
msg = "unsupported operand type(s) for |"
for n in (node.left, node.right):
n = astroid.helpers.object_type(n)
if isinstance(n, nodes... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,859 | object_type | ref | function | n = astroid.helpers.object_type(n)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,860 | is_classdef_type | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,861 | add_message | ref | function | self.add_message("unsupported-binary-operation", args=msg, node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,864 | check_messages | ref | function | @check_messages("unsupported-binary-operation")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,865 | _visit_binop | def | function | def _visit_binop(self, node: nodes.BinOp) -> None:
"""Detect TypeErrors for binary arithmetic operands."""
self._check_binop_errors(node)
@check_messages("unsupported-binary-operation")
def _visit_augassign(self, node: nodes.AugAssign) -> None:
"""Detect TypeErrors for augmented bin... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,867 | _check_binop_errors | ref | function | self._check_binop_errors(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,869 | check_messages | ref | function | @check_messages("unsupported-binary-operation")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,870 | _visit_augassign | def | function | def _visit_augassign(self, node: nodes.AugAssign) -> None:
"""Detect TypeErrors for augmented binary arithmetic operands."""
self._check_binop_errors(node)
def _check_binop_errors(self, node):
for error in node.type_errors():
# Let the error customize its output.
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,872 | _check_binop_errors | ref | function | self._check_binop_errors(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,874 | _check_binop_errors | def | function | def _check_binop_errors(self, node):
for error in node.type_errors():
# Let the error customize its output.
if any(
isinstance(obj, nodes.ClassDef) and not has_known_bases(obj)
for obj in (error.left_type, error.right_type)
):
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,875 | type_errors | ref | function | for error in node.type_errors():
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,878 | has_known_bases | ref | function | isinstance(obj, nodes.ClassDef) and not has_known_bases(obj)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,882 | add_message | ref | function | self.add_message("unsupported-binary-operation", args=str(error), node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,884 | _check_membership_test | def | function | def _check_membership_test(self, node):
if is_inside_abstract_class(node):
return
if is_comprehension(node):
return
inferred = safe_infer(node)
if inferred is None or inferred is astroid.Uninferable:
return
if not supports_membership_test(i... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,885 | is_inside_abstract_class | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,887 | is_comprehension | ref | function | if is_comprehension(node):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,889 | safe_infer | ref | function | inferred = safe_infer(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,892 | supports_membership_test | ref | function | if not supports_membership_test(inferred):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,893 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,894 | as_string | ref | function | "unsupported-membership-test", args=node.as_string(), node=node
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,897 | check_messages | ref | function | @check_messages("unsupported-membership-test")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,898 | visit_compare | def | function | def visit_compare(self, node: nodes.Compare) -> None:
if len(node.ops) != 1:
return
op, right = node.ops[0]
if op in {"in", "not in"}:
self._check_membership_test(right)
@check_messages(
"unsubscriptable-object",
"unsupported-assignment-operation... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,904 | _check_membership_test | ref | function | self._check_membership_test(right)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,906 | check_messages | ref | function | @check_messages(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,914 | visit_subscript | def | function | def visit_subscript(self, node: nodes.Subscript) -> None:
self._check_invalid_sequence_index(node)
supported_protocol: Optional[Callable[[Any, Any], bool]] = None
if isinstance(node.value, (nodes.ListComp, nodes.DictComp)):
return
if isinstance(node.value, nodes.Dict):
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,915 | _check_invalid_sequence_index | ref | function | self._check_invalid_sequence_index(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,923 | safe_infer | ref | function | inferred = safe_infer(node.slice)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,926 | igetattr | ref | function | hash_fn = next(inferred.igetattr("__hash__"))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,931 | add_message | ref | function | self.add_message("unhashable-dict-key", node=node.value)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,944 | add_message | ref | function | self.add_message(msg, args=node.value.as_string(), node=node.value)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,944 | as_string | ref | function | self.add_message(msg, args=node.value.as_string(), node=node.value)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,947 | is_inside_abstract_class | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,950 | safe_infer | ref | function | inferred = safe_infer(node.value)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,956 | safe_infer | ref | function | first_decorator = astroid.helpers.safe_infer(inferred.decorators.nodes[0])
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,958 | instantiate_class | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,963 | supported_protocol | ref | function | if supported_protocol and not supported_protocol(inferred, node):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,964 | add_message | ref | function | self.add_message(msg, args=node.value.as_string(), node=node.value)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,964 | as_string | ref | function | self.add_message(msg, args=node.value.as_string(), node=node.value)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,966 | check_messages | ref | function | @check_messages("dict-items-missing-iter")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,967 | visit_for | def | function | def visit_for(self, node: nodes.For) -> None:
if not isinstance(node.target, nodes.Tuple):
# target is not a tuple
return
if not len(node.target.elts) == 2:
# target is not a tuple of two elements
return
iterable = node.iter
if not isi... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,980 | safe_infer | ref | function | inferred = safe_infer(iterable)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,991 | add_message | ref | function | self.add_message("dict-iter-missing-items", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,994 | IterableChecker | def | class | _is_asyncio_coroutine _check_iterable _check_mapping visit_for visit_asyncfor visit_yieldfrom visit_call visit_listcomp visit_dictcomp visit_setcomp visit_generatorexp visit_await _check_await_outside_coroutine |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,024 | _is_asyncio_coroutine | def | function | def _is_asyncio_coroutine(node):
if not isinstance(node, nodes.Call):
return _False
inferred_func = safe_infer(node.func)
if not isinstance(inferred_func, nodes.FunctionDef):
return _False
if not inferred_func.decorators:
return _False
for... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,028 | safe_infer | ref | function | inferred_func = safe_infer(node.func)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,034 | safe_infer | ref | function | inferred_decorator = safe_infer(decorator)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,037 | qname | ref | function | if inferred_decorator.qname() != ASYNCIO_COROUTINE:
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,042 | _check_iterable | def | function | null |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,043 | is_inside_abstract_class | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,043 | is_comprehension | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,045 | safe_infer | ref | function | inferred = safe_infer(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,048 | is_iterable | ref | function | if not is_iterable(inferred, check_async=check_async):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,049 | add_message | ref | function | self.add_message("not-an-iterable", args=node.as_string(), node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,049 | as_string | ref | function | self.add_message("not-an-iterable", args=node.as_string(), node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,051 | _check_mapping | def | function | def _check_mapping(self, node):
if is_inside_abstract_class(node):
return
if isinstance(node, nodes.DictComp):
return
inferred = safe_infer(node)
if inferred is None or inferred is astroid.Uninferable:
return
if not is_mapping(inferred):
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,052 | is_inside_abstract_class | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,056 | safe_infer | ref | function | inferred = safe_infer(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,059 | is_mapping | ref | function | if not is_mapping(inferred):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,060 | add_message | ref | function | self.add_message("not-a-mapping", args=node.as_string(), node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,060 | as_string | ref | function | self.add_message("not-a-mapping", args=node.as_string(), node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,062 | check_messages | ref | function | @check_messages("not-an-iterable")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 2,063 | visit_for | def | function | def visit_for(self, node: nodes.For) -> None:
if not isinstance(node.target, nodes.Tuple):
# target is not a tuple
return
if not len(node.target.elts) == 2:
# target is not a tuple of two elements
return
iterable = node.iter
if not isi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.