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 | 995 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 996 | _metaclass_name | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 999 | visit_assignattr | def | function | def visit_assignattr(self, node: nodes.AssignAttr) -> None:
if isinstance(node.assign_type(), nodes.AugAssign):
self.visit_attribute(node)
def visit_delattr(self, node: nodes.DelAttr) -> None:
self.visit_attribute(node)
@check_messages("no-member", "c-extension-no-member")
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,000 | assign_type | ref | function | if isinstance(node.assign_type(), nodes.AugAssign):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,001 | visit_attribute | ref | function | self.visit_attribute(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,003 | visit_delattr | def | function | def visit_delattr(self, node: nodes.DelAttr) -> None:
self.visit_attribute(node)
@check_messages("no-member", "c-extension-no-member")
def visit_attribute(self, node: nodes.Attribute) -> None:
"""Check that the accessed attribute exists.
to avoid too much false positives for now, w... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,004 | visit_attribute | ref | function | self.visit_attribute(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,006 | check_messages | ref | function | @check_messages("no-member", "c-extension-no-member")
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,007 | visit_attribute | def | function | def visit_attribute(self, node: nodes.Attribute) -> None:
"""Check that the accessed attribute exists.
to avoid too much false positives for now, we'll consider the code as
correct if a single of the inferred nodes has the accessed attribute.
function/method, super call and metacla... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,017 | as_string | ref | function | for name in (node.attrname, node.as_string())
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,023 | infer | ref | function | inferred = list(node.expr.infer())
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,045 | _is_owner_ignored | ref | function | if _is_owner_ignored(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,050 | pytype | ref | function | qualname = f"{owner.pytype()}.{node.attrname}"
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,060 | statement | ref | function | if not isinstance(n.statement(future=True), nodes.AugAssign)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,078 | _emit_no_member | ref | function | if not _emit_no_member(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,104 | _get_nomember_msgid_hint | ref | function | msg, hint = self._get_nomember_msgid_hint(node, owner)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,105 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,108 | display_type | ref | function | args=(owner.display_type(), name, node.attrname, hint),
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,112 | _get_nomember_msgid_hint | def | function | def _get_nomember_msgid_hint(self, node, owner):
suggestions_are_possible = self._suggestion_mode and isinstance(
owner, nodes.Module
)
if suggestions_are_possible and _is_c_extension(owner):
msg = "c-extension-no-member"
hint = ""
else:
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,116 | _is_c_extension | ref | function | if suggestions_are_possible and _is_c_extension(owner):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,122 | _missing_member_hint | ref | function | hint = _missing_member_hint(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,132 | check_messages | ref | function | @check_messages(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,137 | visit_assign | def | function | def visit_assign(self, node: nodes.Assign) -> None:
"""Process assignments in the AST."""
self._check_assignment_from_function_call(node)
self._check_dundername_is_string(node)
def _check_assignment_from_function_call(self, node: nodes.Assign) -> None:
"""When assigning to a fu... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,140 | _check_assignment_from_function_call | ref | function | self._check_assignment_from_function_call(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,141 | _check_dundername_is_string | ref | function | self._check_dundername_is_string(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,143 | _check_assignment_from_function_call | def | function | def _check_assignment_from_function_call(self, node: nodes.Assign) -> None:
"""When assigning to a function call, check that the function returns a valid value."""
if not isinstance(node.value, nodes.Call):
return
function_node = safe_infer(node.value.func)
funcs = (node... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,148 | safe_infer | ref | function | function_node = safe_infer(node.value.func)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,164 | _is_ignored_function | ref | function | or self._is_ignored_function(function_node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,169 | _is_list_sort_method | ref | function | if self._is_list_sort_method(node.value):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,170 | add_message | ref | function | self.add_message("assignment-from-none", node=node, confidence=INFERENCE)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,173 | root | ref | function | if not function_node.root().fully_defined():
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,173 | fully_defined | ref | function | if not function_node.root().fully_defined():
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,177 | nodes_of_class | ref | class | |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,180 | add_message | ref | function | self.add_message("assignment-from-no-return", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,190 | add_message | ref | function | self.add_message("assignment-from-none", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,193 | _is_ignored_function | def | function | def _is_ignored_function(
function_node: Union[nodes.FunctionDef, bases.UnboundMethod]
) -> bool:
return (
isinstance(function_node, nodes.AsyncFunctionDef)
or utils.is_error(function_node)
or function_node.is_generator()
or function_node.is_abstra... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,198 | is_error | ref | function | or utils.is_error(function_node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,199 | is_generator | ref | function | or function_node.is_generator()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,200 | is_abstract | ref | function | or function_node.is_abstract(pass_is_abstract=False)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,204 | _is_list_sort_method | def | function | def _is_list_sort_method(node: nodes.Call) -> bool:
return (
isinstance(node.func, nodes.Attribute)
and node.func.attrname == "sort"
and isinstance(utils.safe_infer(node.func.expr), nodes.List)
)
def _check_dundername_is_string(self, node) -> None:
""... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,208 | safe_infer | ref | function | and isinstance(utils.safe_infer(node.func.expr), nodes.List)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,211 | _check_dundername_is_string | def | function | def _check_dundername_is_string(self, node) -> None:
"""Check a string is assigned to self.__name__."""
# Check the left-hand side of the assignment is <something>.__name__
lhs = node.targets[0]
if not isinstance(lhs, nodes.AssignAttr):
return
if not lhs.attrname... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,225 | safe_infer | ref | function | inferred = utils.safe_infer(rhs)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,230 | add_message | ref | function | self.add_message("non-str-assignment-to-dunder-name", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,232 | _check_uninferable_call | def | function | def _check_uninferable_call(self, node):
"""Check that the given uninferable Call node does not
call an actual function.
"""
if not isinstance(node.func, nodes.Attribute):
return
# Look for properties. First, obtain
# the lhs of the Attribute node and sea... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,245 | safe_infer | ref | function | klass = safe_infer(expr)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,266 | decorated_with_property | ref | function | if decorated_with_property(attr):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,271 | infer_call_result | ref | function | for return_node in attr.infer_call_result(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,277 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,278 | as_string | ref | function | "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,282 | _check_argument_order | def | function | def _check_argument_order(self, node, call_site, called, called_param_names):
"""Match the supplied argument names against the function parameters.
Warn if some argument names are not in the same order as they are in
the function signature.
"""
# Check for called function bei... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,319 | add_message | ref | function | self.add_message("arguments-out-of-order", node=node, args=())
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,321 | _check_isinstance_args | def | function | def _check_isinstance_args(self, node):
if len(node.args) != 2:
# isinstance called with wrong number of args
return
second_arg = node.args[1]
if _is_invalid_isinstance_type(second_arg):
self.add_message("isinstance-second-argument-not-valid-type", node=n... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,327 | _is_invalid_isinstance_type | ref | function | if _is_invalid_isinstance_type(second_arg):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,328 | add_message | ref | function | self.add_message("isinstance-second-argument-not-valid-type", node=node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,331 | check_messages | ref | function | @check_messages(*(list(MSGS.keys())))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,332 | visit_call | def | function | def visit_call(self, node: nodes.Call) -> None:
"""Check that called functions/methods are inferred to callable objects,
and that the arguments passed to the function match the parameters in
the inferred function's definition
"""
called = safe_infer(node.func)
self._... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,337 | safe_infer | ref | function | called = safe_infer(node.func)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,339 | _check_not_callable | ref | function | self._check_not_callable(node, called)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,342 | _determine_callable | ref | function | called, implicit_args, callable_name = _determine_callable(called)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,351 | _check_isinstance_args | ref | function | self._check_isinstance_args(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,355 | argnames | ref | function | if len(called.argnames()) != len(set(called.argnames())):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,355 | argnames | ref | function | if len(called.argnames()) != len(set(called.argnames())):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,362 | from_call | ref | function | call_site = astroid.arguments.CallSite.from_call(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,366 | add_message | ref | function | self.add_message("repeated-keyword", node=node, args=(keyword,))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,368 | has_invalid_arguments | ref | function | if call_site.has_invalid_arguments() or call_site.has_invalid_keywords():
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,368 | has_invalid_keywords | ref | function | if call_site.has_invalid_arguments() or call_site.has_invalid_keywords():
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,373 | decorated_with | ref | function | if hasattr(called, "decorators") and decorated_with(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,380 | is_overload_stub | ref | function | overload_function = is_overload_stub(called)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,383 | scope | ref | function | node_scope = node.scope()
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,385 | _no_context_variadic_positional | ref | function | has_no_context_positional_variadic = _no_context_variadic_positional(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,388 | _no_context_variadic_keywords | ref | function | has_no_context_keywords_variadic = _no_context_variadic_keywords(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,434 | _check_argument_order | ref | function | self._check_argument_order(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,448 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,465 | qname | ref | function | if not (keyword == "self" and called.qname() in STR_FORMAT):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,466 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,476 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,488 | _keyword_argument_is_in_all_decorator_returns | ref | function | ) and self._keyword_argument_is_in_all_decorator_returns(called, keyword):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,492 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,513 | add_message | ref | function | self.add_message(
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,527 | add_message | ref | function | self.add_message("missing-kwoa", node=node, args=(name, callable_name))
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,530 | _keyword_argument_is_in_all_decorator_returns | def | function | def _keyword_argument_is_in_all_decorator_returns(
func: nodes.FunctionDef, keyword: str
) -> bool:
"""Check if the keyword argument exists in all signatures of the
return values of all decorators of the function.
"""
if not func.decorators:
return _False
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,540 | safe_infer | ref | function | inferred = safe_infer(decorator)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,551 | infer_call_result | ref | function | for return_value in inferred.infer_call_result():
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,562 | is_argument | ref | function | if return_value.args.is_argument(keyword):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,569 | _check_invalid_sequence_index | def | function | def _check_invalid_sequence_index(self, subscript: nodes.Subscript):
# Look for index operations where the parent is a sequence type.
# If the types can be determined, only allow indices to be int,
# slice or instances with __index__.
parent_type = safe_infer(subscript.value)
... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,573 | safe_infer | ref | function | parent_type = safe_infer(subscript.value)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,576 | has_known_bases | ref | function | ) or not has_known_bases(parent_type):
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,594 | lookup | ref | function | methods = astroid.interpreter.dunder_lookup.lookup(parent_type, methodname)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,605 | root | ref | function | or itemmethod.root().name != "builtins"
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,607 | frame | ref | function | or itemmethod.parent.frame().name not in SEQUENCE_TYPES
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,617 | safe_infer | ref | function | index_type = safe_infer(subscript.slice)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,626 | pytype | ref | function | if index_type.pytype() in {"builtins.int", "builtins.slice"}:
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,637 | _check_invalid_slice_index | ref | function | return self._check_invalid_slice_index(index_type)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,640 | add_message | ref | function | self.add_message("invalid-sequence-index", node=subscript)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,643 | _check_not_callable | def | function | def _check_not_callable(
self, node: nodes.Call, inferred_call: Optional[nodes.NodeNG]
) -> None:
"""Checks to see if the not-callable message should be emitted.
Only functions, generators and objects defining __call__ are "callable"
We ignore instances of descriptors since astr... |
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,653 | _check_uninferable_call | ref | function | self._check_uninferable_call(node)
|
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/typecheck.py | pylint/checkers/typecheck.py | 1,657 | 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,657 | 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,661 | has_known_bases | ref | function | if not has_known_bases(inferred_call):
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.