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/utils.py
pylint/checkers/utils.py
971
is_from_fallback_block
def
function
def is_from_fallback_block(node: nodes.NodeNG) -> bool: """Check if the given node is from a fallback import block.""" context = find_try_except_wrapper_node(node) if not context: return _False if isinstance(context, nodes.ExceptHandler): other_body = context.parent.body handler...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
973
find_try_except_wrapper_node
ref
function
context = find_try_except_wrapper_node(node)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
981
from_iterable
ref
function
other_body = itertools.chain.from_iterable(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
990
_except_handlers_ignores_exceptions
ref
function
ignores_import_error = _except_handlers_ignores_exceptions(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
996
_except_handlers_ignores_exceptions
def
function
def _except_handlers_ignores_exceptions( handlers: nodes.ExceptHandler, exceptions: tuple[type[ImportError], type[ModuleNotFoundError]],
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,001
func
ref
function
return any(func(handler) for handler in handlers)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,004
get_exception_handlers
def
function
def get_exception_handlers( node: nodes.NodeNG, exception=Exception
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,017
find_try_except_wrapper_node
ref
function
context = find_try_except_wrapper_node(node)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,020
error_of_type
ref
function
handler for handler in context.handlers if error_of_type(handler, exception)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,025
is_node_inside_try_except
def
function
def is_node_inside_try_except(node: nodes.Raise) -> bool: """Check if the node is directly under a Try/Except statement (but not under an ExceptHandler!). Args: node (nodes.Raise): the node raising the exception. Returns: bool: _True if the node is inside a try/except statement, _False...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,035
find_try_except_wrapper_node
ref
function
context = find_try_except_wrapper_node(node)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,039
node_ignores_exception
def
function
def node_ignores_exception(node: nodes.NodeNG, exception=Exception) -> bool: """Check if the node is in a TryExcept which handles the given exception. If the exception is not given, the function is going to look for bare excepts. """ managing_handlers = get_exception_handlers(node, exception) i...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,045
get_exception_handlers
ref
function
managing_handlers = get_exception_handlers(node, exception)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,051
class_is_abstract
def
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,056
declared_metaclass
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,058
root
ref
function
if meta.name == "ABCMeta" and meta.root().name in ABC_MODULES:
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,061
ancestors
ref
function
for ancestor in node.ancestors():
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,062
root
ref
function
if ancestor.name == "ABC" and ancestor.root().name in ABC_MODULES:
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,066
methods
ref
function
for method in node.methods():
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,067
frame
ref
function
if method.parent.frame(future=True) is node:
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,068
is_abstract
ref
function
if method.is_abstract(pass_is_abstract=False):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,073
_supports_protocol_method
def
function
def _supports_protocol_method(value: nodes.NodeNG, attr: str) -> bool: try: attributes = value.getattr(attr) except astroid.NotFoundError: return _False first = attributes[0] # Return _False if a constant is assigned if isinstance(first, nodes.AssignName): this_assign_paren...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,083
get_node_first_ancestor_of_type
ref
function
this_assign_parent = get_node_first_ancestor_of_type(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,097
is_comprehension
def
function
def is_comprehension(node: nodes.NodeNG) -> bool: comprehensions = ( nodes.ListComp, nodes.SetComp, nodes.DictComp, nodes.GeneratorExp, ) return isinstance(node, comprehensions)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,107
_supports_mapping_protocol
def
function
def _supports_mapping_protocol(value: nodes.NodeNG) -> bool: return _supports_protocol_method( value, GETITEM_METHOD ) and _supports_protocol_method(value, KEYS_METHOD)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,108
_supports_protocol_method
ref
function
return _supports_protocol_method(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,110
_supports_protocol_method
ref
function
) and _supports_protocol_method(value, KEYS_METHOD)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,113
_supports_membership_test_protocol
def
function
def _supports_membership_test_protocol(value: nodes.NodeNG) -> bool: return _supports_protocol_method(value, CONTAINS_METHOD)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,114
_supports_protocol_method
ref
function
return _supports_protocol_method(value, CONTAINS_METHOD)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,117
_supports_iteration_protocol
def
function
def _supports_iteration_protocol(value: nodes.NodeNG) -> bool: return _supports_protocol_method(value, ITER_METHOD) or _supports_protocol_method( value, GETITEM_METHOD )
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,118
_supports_protocol_method
ref
function
return _supports_protocol_method(value, ITER_METHOD) or _supports_protocol_method(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,118
_supports_protocol_method
ref
function
return _supports_protocol_method(value, ITER_METHOD) or _supports_protocol_method(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,123
_supports_async_iteration_protocol
def
function
def _supports_async_iteration_protocol(value: nodes.NodeNG) -> bool: return _supports_protocol_method(value, AITER_METHOD)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,124
_supports_protocol_method
ref
function
return _supports_protocol_method(value, AITER_METHOD)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,127
_supports_getitem_protocol
def
function
def _supports_getitem_protocol(value: nodes.NodeNG) -> bool: return _supports_protocol_method(value, GETITEM_METHOD)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,128
_supports_protocol_method
ref
function
return _supports_protocol_method(value, GETITEM_METHOD)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,131
_supports_setitem_protocol
def
function
def _supports_setitem_protocol(value: nodes.NodeNG) -> bool: return _supports_protocol_method(value, SETITEM_METHOD)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,132
_supports_protocol_method
ref
function
return _supports_protocol_method(value, SETITEM_METHOD)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,135
_supports_delitem_protocol
def
function
def _supports_delitem_protocol(value: nodes.NodeNG) -> bool: return _supports_protocol_method(value, DELITEM_METHOD)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,136
_supports_protocol_method
ref
function
return _supports_protocol_method(value, DELITEM_METHOD)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,139
_is_abstract_class_name
def
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,147
is_inside_abstract_class
def
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,150
class_is_abstract
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,153
_is_abstract_class_name
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,159
_supports_protocol
def
function
def _supports_protocol( value: nodes.NodeNG, protocol_callback: nodes.FunctionDef
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,163
has_known_bases
ref
function
if not has_known_bases(value):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,166
metaclass
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,168
protocol_callback
ref
function
if protocol_callback(meta):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,171
has_known_bases
ref
function
if not has_known_bases(value):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,173
has_dynamic_getattr
ref
function
if value.has_dynamic_getattr():
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,175
protocol_callback
ref
function
if protocol_callback(value):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,185
has_known_bases
ref
function
and has_known_bases(value._proxied)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,188
protocol_callback
ref
function
return protocol_callback(value)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,193
is_iterable
def
function
null
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,198
_supports_protocol
ref
function
return _supports_protocol(value, protocol_check)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,201
is_mapping
def
function
def is_mapping(value: nodes.NodeNG) -> bool: return _supports_protocol(value, _supports_mapping_protocol)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,202
_supports_protocol
ref
function
return _supports_protocol(value, _supports_mapping_protocol)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,205
supports_membership_test
def
function
def supports_membership_test(value: nodes.NodeNG) -> bool: supported = _supports_protocol(value, _supports_membership_test_protocol) return supported or is_iterable(value)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,206
_supports_protocol
ref
function
supported = _supports_protocol(value, _supports_membership_test_protocol)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,207
is_iterable
ref
function
return supported or is_iterable(value)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,210
supports_getitem
def
function
def supports_getitem(value: nodes.NodeNG, node: nodes.NodeNG) -> bool: if isinstance(value, nodes.ClassDef): if _supports_protocol_method(value, CLASS_GETITEM_METHOD): return _True if is_class_subscriptable_pep585_with_postponed_evaluation_enabled(value, node): return _True ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,212
_supports_protocol_method
ref
function
if _supports_protocol_method(value, CLASS_GETITEM_METHOD):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,214
is_class_subscriptable_pep585_with_postponed_evaluation_enabled
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,216
_supports_protocol
ref
function
return _supports_protocol(value, _supports_getitem_protocol)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,219
supports_setitem
def
function
def supports_setitem(value: nodes.NodeNG, _: nodes.NodeNG) -> bool: return _supports_protocol(value, _supports_setitem_protocol)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,220
_supports_protocol
ref
function
return _supports_protocol(value, _supports_setitem_protocol)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,223
supports_delitem
def
function
def supports_delitem(value: nodes.NodeNG, _: nodes.NodeNG) -> bool: return _supports_protocol(value, _supports_delitem_protocol)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,224
_supports_protocol
ref
function
return _supports_protocol(value, _supports_delitem_protocol)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,227
_get_python_type_of_node
def
function
def _get_python_type_of_node(node: nodes.NodeNG) -> str | None: pytype = getattr(node, "pytype", None) if callable(pytype): return pytype() return None
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,230
pytype
ref
function
return pytype()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,235
safe_infer
def
function
def safe_infer( node: nodes.NodeNG, context: InferenceContext | None = None
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,245
infer
ref
function
infer_gen = node.infer(context=context)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,251
_get_python_type_of_node
ref
function
inferred_types.add(_get_python_type_of_node(value))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,255
_get_python_type_of_node
ref
function
inferred_type = _get_python_type_of_node(inferred)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,274
infer_all
def
function
def infer_all( node: nodes.NodeNG, context: InferenceContext = None
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,278
infer
ref
function
return list(node.infer(context=context))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,283
has_known_bases
def
function
def has_known_bases(klass: nodes.ClassDef, context=None) -> bool: """Return true if all base classes of a class could be inferred.""" try: return klass._all_bases_known except AttributeError: pass for base in klass.bases: result = safe_infer(base, context=context) if ( ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,290
safe_infer
ref
function
result = safe_infer(base, context=context)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,294
has_known_bases
ref
function
or not has_known_bases(result, context=context)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,302
is_none
def
function
def is_none(node: nodes.NodeNG) -> bool: return ( node is None or (isinstance(node, nodes.Const) and node.value is None) or (isinstance(node, nodes.Name) and node.name == "None") )
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,310
node_type
def
function
def node_type(node: nodes.NodeNG) -> nodes.NodeNG | None: """Return the inferred type for `node`. If there is more than one possible type, or if inferred type is Uninferable or None, return None """ # check there is only one possible type for the assign node. Else we # don't handle it for now ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,320
infer
ref
function
for var_type in node.infer():
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,321
is_none
ref
function
if var_type == astroid.Uninferable or is_none(var_type):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,331
is_registered_in_singledispatch_function
def
function
def is_registered_in_singledispatch_function(node: nodes.FunctionDef) -> bool: """Check if the given function node is a singledispatch function.""" singledispatch_qnames = ( "functools.singledispatch", "singledispatch.singledispatch", ) if not isinstance(node, nodes.FunctionDef): ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,353
infer
ref
function
func_def = next(func.expr.infer())
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,358
decorated_with
ref
function
return decorated_with(func_def, singledispatch_qnames)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,363
get_node_last_lineno
def
function
def get_node_last_lineno(node: nodes.NodeNG) -> int: """Get the last lineno of the given node. For a simple statement this will just be node.lineno, but for a node that has child statements (e.g. a method) this will be the lineno of the last child statement recursively. """ # 'finalbody' is alw...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,372
get_node_last_lineno
ref
function
return get_node_last_lineno(node.finalbody[-1])
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,376
get_node_last_lineno
ref
function
return get_node_last_lineno(node.orelse[-1])
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,379
get_node_last_lineno
ref
function
return get_node_last_lineno(node.handlers[-1])
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,382
get_node_last_lineno
ref
function
return get_node_last_lineno(node.body[-1])
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,387
is_postponed_evaluation_enabled
def
function
def is_postponed_evaluation_enabled(node: nodes.NodeNG) -> bool: """Check if the postponed evaluation of annotations is enabled.""" module = node.root() return "annotations" in module.future_imports
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,389
root
ref
function
module = node.root()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,393
is_class_subscriptable_pep585_with_postponed_evaluation_enabled
def
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,400
is_postponed_evaluation_enabled
ref
function
is_postponed_evaluation_enabled(node)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,401
qname
ref
function
and value.qname() in SUBSCRIPTABLE_CLASSES_PEP585
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,402
is_node_in_type_annotation_context
ref
function
and is_node_in_type_annotation_context(node)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,406
is_node_in_type_annotation_context
def
function
def is_node_in_type_annotation_context(node: nodes.NodeNG) -> bool: """Check if node is in type annotation context. Check for 'AnnAssign', function 'Arguments', or part of function return type annotation. """ # pylint: disable=too-many-boolean-expressions current_node, parent_node = node, node....
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,436
is_subclass_of
def
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
1,446
ancestors
ref
function
for ancestor in child.ancestors():