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/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
452
_enum_has_attribute
ref
function
if _enum_has_attribute(owner, node):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
455
qname
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
457
has_known_bases
ref
function
if not has_known_bases(owner):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
462
is_attribute_typed_annotation
ref
function
if utils.is_attribute_typed_annotation(owner, node.attrname):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
470
super_mro
ref
function
owner.super_mro()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
473
has_known_bases
ref
function
if not all(has_known_bases(base) for base in owner.type.mro()):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
473
mro
ref
function
if not all(has_known_bases(base) for base in owner.type.mro()):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
505
scope
ref
function
scope: nodes.NodeNG = node.scope()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
510
safe_infer
ref
function
inferred = safe_infer(parent.test)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
513
bool_value
ref
function
and inferred.bool_value() is False
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
527
_get_all_attribute_assignments
def
function
def _get_all_attribute_assignments( node: nodes.FunctionDef, name: str | None = None
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
531
nodes_of_class
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
550
_enum_has_attribute
def
function
def _enum_has_attribute( owner: astroid.Instance | nodes.ClassDef, node: nodes.Attribute
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
572
methods
ref
function
dunder_new = next((m for m in enum_def.methods() if m.name == "__new__"), None)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
573
methods
ref
function
dunder_init = next((m for m in enum_def.methods() if m.name == "__init__"), None)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
581
get_children
ref
function
(c.value for c in dunder_new.get_children() if isinstance(c, nodes.Return)),
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
586
_get_all_attribute_assignments
ref
function
enum_attributes |= _get_all_attribute_assignments(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
593
_get_all_attribute_assignments
ref
function
enum_attributes |= _get_all_attribute_assignments(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
600
_determine_callable
def
function
def _determine_callable( callable_obj: nodes.NodeNG,
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
612
implicit_parameters
ref
function
parameters = callable_obj.implicit_parameters()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
630
local_attr
ref
function
new = callable_obj.local_attr("__new__")[-1]
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
634
scope
ref
function
from_object = new and new.parent.scope().name == "object"
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
635
root
ref
function
from_builtins = new and new.root().name in sys.builtin_module_names
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
640
local_attr
ref
function
callable_obj = callable_obj.local_attr("__init__")[-1]
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
654
_has_parent_of_type
def
function
def _has_parent_of_type(node, node_type, statement): """Check if the given node has a parent of the given type.""" parent = node.parent while not isinstance(parent, node_type) and statement.parent_of(parent): parent = parent.parent return isinstance(parent, node_type)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
657
parent_of
ref
function
while not isinstance(parent, node_type) and statement.parent_of(parent):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
662
_no_context_variadic_keywords
def
function
def _no_context_variadic_keywords(node, scope): statement = node.statement(future=_True) variadics = () if isinstance(scope, nodes.Lambda) and not isinstance(scope, nodes.FunctionDef): variadics = list(node.keywords or []) + node.kwargs elif isinstance(statement, (nodes.Return, nodes.Expr, node...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
663
statement
ref
function
statement = node.statement(future=True)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
674
_no_context_variadic
ref
function
return _no_context_variadic(node, scope.args.kwarg, nodes.Keyword, variadics)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
677
_no_context_variadic_positional
def
function
def _no_context_variadic_positional(node, scope): variadics = node.starargs + node.kwargs return _no_context_variadic(node, scope.args.vararg, nodes.Starred, variadics)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
679
_no_context_variadic
ref
function
return _no_context_variadic(node, scope.args.vararg, nodes.Starred, variadics)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
682
_no_context_variadic
def
function
def _no_context_variadic(node, variadic_name, variadic_type, variadics): """Verify if the given call node has variadic nodes without context. This is a workaround for handling cases of nested call functions which don't have the specific call context at hand. Variadic arguments (variable positional argu...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
693
scope
ref
function
scope = node.scope()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
697
statement
ref
function
statement = node.statement(future=True)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
698
nodes_of_class
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
702
safe_infer
ref
function
inferred = safe_infer(name)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
715
statement
ref
function
inferred_statement = inferred.statement(future=True)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
718
_has_parent_of_type
ref
function
is_in_starred_context = _has_parent_of_type(node, variadic_type, statement)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
720
parent_of
ref
function
variadic.value == name or variadic.value.parent_of(name)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
728
_is_invalid_metaclass
def
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
730
mro
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
735
is_builtin_object
ref
function
if not any(is_builtin_object(cls) and cls.name == "type" for cls in mro):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
740
_infer_from_metaclass_constructor
def
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
757
InferenceContext
ref
function
context = astroid.context.InferenceContext()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
759
List
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
760
postinit
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
762
Dict
ref
function
attrs = nodes.Dict()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
764
postinit
ref
function
attrs.postinit(local_names)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
766
Tuple
ref
function
builder_args = nodes.Tuple()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
767
postinit
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
769
CallContext
ref
function
context.callcontext = astroid.context.CallContext(builder_args)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
771
infer_call_result
ref
function
inferred = next(func.infer_call_result(func, context), None)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
777
_is_c_extension
def
function
def _is_c_extension(module_node): return ( not astroid.modutils.is_standard_module(module_node.name) and not module_node.fully_defined() )
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
779
is_standard_module
ref
function
not astroid.modutils.is_standard_module(module_node.name)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
780
fully_defined
ref
function
and not module_node.fully_defined()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
784
_is_invalid_isinstance_type
def
function
def _is_invalid_isinstance_type(arg): # Return _True if we are sure that arg is not a type inferred = utils.safe_infer(arg) if not inferred: # Cannot infer it so skip it. return _False if isinstance(inferred, nodes.Tuple): return any(_is_invalid_isinstance_type(elt) for elt in in...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
786
safe_infer
ref
function
inferred = utils.safe_infer(arg)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
791
_is_invalid_isinstance_type
ref
function
return any(_is_invalid_isinstance_type(elt) for elt in inferred.elts)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
794
qname
ref
function
if isinstance(inferred, astroid.Instance) and inferred.qname() == BUILTIN_TUPLE:
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
799
TypeChecker
def
class
open _suggestion_mode _compiled_generated_members visit_functiondef visit_classdef visit_assignattr visit_delattr visit_attribute _get_nomember_msgid_hint visit_assign _check_assignment_from_function_call _is_ignored_function _is_list_sort_method _check_dundername_is_string _check_uninferable_call _check_argument_order...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
959
_suggestion_mode
def
function
def _suggestion_mode(self): return self.linter.config.suggestion_mode @cached_property def _compiled_generated_members(self) -> tuple[Pattern, ...]: # do this lazily since config not fully initialized in __init__ # generated_members may contain regular expressions # (surroun...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
963
_compiled_generated_members
def
function
def _compiled_generated_members(self) -> tuple[Pattern, ...]: # do this lazily since config not fully initialized in __init__ # generated_members may contain regular expressions # (surrounded by quote `"` and followed by a comma `,`) # REQUEST,aq_parent,"[a-zA-Z]+_set{1,2}"' => ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
977
only_required_for_messages
ref
function
@only_required_for_messages("keyword-arg-before-vararg")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
978
visit_functiondef
def
function
def visit_functiondef(self, node: nodes.FunctionDef) -> None: # check for keyword arg before varargs if node.args.vararg and node.args.defaults: self.add_message("keyword-arg-before-vararg", node=node, args=(node.name)) visit_asyncfunctiondef = visit_functiondef @only_required_...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
981
add_message
ref
function
self.add_message("keyword-arg-before-vararg", node=node, args=(node.name))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
985
only_required_for_messages
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
986
visit_classdef
def
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
987
_metaclass_name
def
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
995
as_string
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
997
declared_metaclass
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,003
_infer_from_metaclass_constructor
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,009
_is_invalid_metaclass
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,010
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,011
_metaclass_name
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,014
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,015
_metaclass_name
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,018
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) @only_required_for_messages("no-member", "c-extension-no-m...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,019
assign_type
ref
function
if isinstance(node.assign_type(), nodes.AugAssign):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,020
visit_attribute
ref
function
self.visit_attribute(node)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,022
visit_delattr
def
function
def visit_delattr(self, node: nodes.DelAttr) -> None: self.visit_attribute(node) @only_required_for_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 positive...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,023
visit_attribute
ref
function
self.visit_attribute(node)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,025
only_required_for_messages
ref
function
@only_required_for_messages("no-member", "c-extension-no-member")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,026
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/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,036
as_string
ref
function
for name in (node.attrname, node.as_string())
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,042
infer
ref
function
inferred = list(node.expr.infer())
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,064
_is_owner_ignored
ref
function
if _is_owner_ignored(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,072
pytype
ref
function
qualname = f"{owner.pytype()}.{node.attrname}"
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,092
_emit_no_member
ref
function
if not _emit_no_member(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,111
statement
ref
function
attr_node.statement(future=True), nodes.AugAssign
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,138
_get_nomember_msgid_hint
ref
function
msg, hint = self._get_nomember_msgid_hint(node, owner)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,139
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,142
display_type
ref
function
args=(owner.display_type(), name, node.attrname, hint),
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,146
_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/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,150
_is_c_extension
ref
function
if suggestions_are_possible and _is_c_extension(owner):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,156
_missing_member_hint
ref
function
hint = _missing_member_hint(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,166
only_required_for_messages
ref
function
@only_required_for_messages(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,171
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/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,174
_check_assignment_from_function_call
ref
function
self._check_assignment_from_function_call(node)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,175
_check_dundername_is_string
ref
function
self._check_dundername_is_string(node)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
1,177
_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...