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/strings.py
pylint/checkers/strings.py
524
_check_new_format_specifiers
def
function
def _check_new_format_specifiers(self, node, fields, named): """Check attribute and index access in the format string ("{0.a}" and "{0[a]}"). """ for key, specifiers in fields: # Obtain the argument. If it can't be obtained # or inferred, skip this check. ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
538
get_argument_from_call
ref
function
argname = utils.get_argument_from_call(node, key)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
548
safe_infer
ref
function
argument = utils.safe_infer(argname)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
571
has_dynamic_getattr
ref
function
and previous.has_dynamic_getattr()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
575
get_access_path
ref
function
path = get_access_path(key, parsed)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
576
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
586
getitem
ref
function
previous = previous.getitem(nodes.Const(specifier))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
586
Const
ref
function
previous = previous.getitem(nodes.Const(specifier))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
607
get_access_path
ref
function
path = get_access_path(key, parsed)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
608
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
614
infer
ref
function
previous = next(previous.infer())
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
620
StringConstantChecker
def
class
__init__ process_module process_tokens visit_call visit_list visit_set visit_tuple visit_assign check_for_consistent_string_delimiters check_for_concatenated_strings process_string_token process_non_raw_string_token visit_const _detect_u_string_prefix
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
698
process_module
def
function
def process_module(self, node: nodes.Module) -> None: self._unicode_literals = "unicode_literals" in node.future_imports def process_tokens(self, tokens: list[tokenize.TokenInfo]) -> None: encoding = "ascii" for i, (token_type, token, start, _, line) in enumerate(tokens): if...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
701
process_tokens
def
function
def process_tokens(self, tokens: list[tokenize.TokenInfo]) -> None: encoding = "ascii" for i, (token_type, token, start, _, line) in enumerate(tokens): if token_type == tokenize.ENCODING: # this is always the first token processed encoding = token ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
710
process_string_token
ref
function
self.process_string_token(token, start[0], start[1])
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
724
str_eval
ref
function
self.string_tokens[start] = (str_eval(token), next_token)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
727
check_for_consistent_string_delimiters
ref
function
self.check_for_consistent_string_delimiters(tokens)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
729
only_required_for_messages
ref
function
@only_required_for_messages("implicit-str-concat")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
730
visit_call
def
function
def visit_call(self, node: nodes.Call) -> None: func = utils.safe_infer(node.func) if ( isinstance(func, astroid.BoundMethod) and isinstance(func.bound, astroid.Instance) and func.bound.name in {"str", "unicode", "bytes"} ): if func.name in {"s...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
731
check_for_concatenated_strings
ref
function
self.check_for_concatenated_strings(node.args, "call")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
733
only_required_for_messages
ref
function
@only_required_for_messages("implicit-str-concat")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
734
visit_list
def
function
def visit_list(self, node: nodes.List) -> None: self.check_for_concatenated_strings(node.elts, "list") @only_required_for_messages("implicit-str-concat") def visit_set(self, node: nodes.Set) -> None: self.check_for_concatenated_strings(node.elts, "set") @only_required_for_messages("imp...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
735
check_for_concatenated_strings
ref
function
self.check_for_concatenated_strings(node.elts, "list")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
737
only_required_for_messages
ref
function
@only_required_for_messages("implicit-str-concat")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
738
visit_set
def
function
def visit_set(self, node: nodes.Set) -> None: self.check_for_concatenated_strings(node.elts, "set") @only_required_for_messages("implicit-str-concat") def visit_tuple(self, node: nodes.Tuple) -> None: self.check_for_concatenated_strings(node.elts, "tuple") def visit_assign(self, node: ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
739
check_for_concatenated_strings
ref
function
self.check_for_concatenated_strings(node.elts, "set")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
741
only_required_for_messages
ref
function
@only_required_for_messages("implicit-str-concat")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
742
visit_tuple
def
function
def visit_tuple(self, node: nodes.Tuple) -> None: self.check_for_concatenated_strings(node.elts, "tuple") def visit_assign(self, node: nodes.Assign) -> None: if isinstance(node.value, nodes.Const) and isinstance(node.value.value, str): self.check_for_concatenated_strings([node.value...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
743
check_for_concatenated_strings
ref
function
self.check_for_concatenated_strings(node.elts, "tuple")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
745
visit_assign
def
function
def visit_assign(self, node: nodes.Assign) -> None: if isinstance(node.value, nodes.Const) and isinstance(node.value.value, str): self.check_for_concatenated_strings([node.value], "assignment") def check_for_consistent_string_delimiters( self, tokens: Iterable[tokenize.TokenInfo] ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
747
check_for_concatenated_strings
ref
function
self.check_for_concatenated_strings([node.value], "assignment")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
749
check_for_consistent_string_delimiters
def
function
def check_for_consistent_string_delimiters( self, tokens: Iterable[tokenize.TokenInfo] ) -> None: """Adds a message for each string using inconsistent quote delimiters. Quote delimiters are used inconsistently if " and ' are mixed in a module's shortstrings without having done s...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
765
_is_quote_delimiter_chosen_freely
ref
function
if tok_type == tokenize.STRING and _is_quote_delimiter_chosen_freely(token):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
766
_get_quote_delimiter
ref
function
string_delimiters[_get_quote_delimiter(token)] += 1
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
774
_get_quote_delimiter
ref
function
quote_delimiter = _get_quote_delimiter(token)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
776
_is_quote_delimiter_chosen_freely
ref
function
_is_quote_delimiter_chosen_freely(token)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
779
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
783
check_for_concatenated_strings
def
function
def check_for_concatenated_strings( self, elements: Sequence[nodes.NodeNG], iterable_type: str ) -> None: for elt in elements: if not ( isinstance(elt, nodes.Const) and elt.pytype() in _AST_NODE_STR_TYPES ): continue if elt.col_...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
788
pytype
ref
function
isinstance(elt, nodes.Const) and elt.pytype() in _AST_NODE_STR_TYPES
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
807
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
814
process_string_token
def
function
def process_string_token(self, token, start_row, start_col): quote_char = None index = None for index, char in enumerate(token): if char in "'\"": quote_char = char break if quote_char is None: return prefix = token[:in...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
833
process_non_raw_string_token
ref
function
self.process_non_raw_string_token(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
840
process_non_raw_string_token
def
function
def process_non_raw_string_token( self, prefix, string_body, start_row, string_start_col ): """Check for bad escapes in a non-raw string. prefix: lowercase string of string prefix markers ('ur'). string_body: the un-parsed body of the string, not including the quote mark...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
884
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
891
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
902
only_required_for_messages
ref
function
@only_required_for_messages("redundant-u-string-prefix")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
903
visit_const
def
function
def visit_const(self, node: nodes.Const) -> None: if node.pytype() == "builtins.str" and not isinstance( node.parent, nodes.JoinedStr ): self._detect_u_string_prefix(node) def _detect_u_string_prefix(self, node: nodes.Const): """Check whether strings include a 'u...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
904
pytype
ref
function
if node.pytype() == "builtins.str" and not isinstance(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
907
_detect_u_string_prefix
ref
function
self._detect_u_string_prefix(node)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
909
_detect_u_string_prefix
def
function
def _detect_u_string_prefix(self, node: nodes.Const): """Check whether strings include a 'u' prefix like u'String'.""" if node.kind == "u": self.add_message( "redundant-u-string-prefix", line=node.lineno, col_offset=node.col_offset, ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
912
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
919
register
def
function
def register(linter: PyLinter) -> None: linter.register_checker(StringFormatChecker(linter)) linter.register_checker(StringConstantChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
920
register_checker
ref
function
linter.register_checker(StringFormatChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
920
StringFormatChecker
ref
function
linter.register_checker(StringFormatChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
921
register_checker
ref
function
linter.register_checker(StringConstantChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
921
StringConstantChecker
ref
function
linter.register_checker(StringConstantChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
924
str_eval
def
function
def str_eval(token): """Mostly replicate `ast.literal_eval(token)` manually to avoid any performance hit. This supports f-strings, contrary to `ast.literal_eval`. We have to support all string literal notations: https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals """...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
940
_is_long_string
def
function
def _is_long_string(string_token: str) -> bool: """Is this string token a "longstring" (is it triple-quoted)? Long strings are triple-quoted as defined in https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals This function only checks characters up through the open quotes...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
963
_get_quote_delimiter
def
function
def _get_quote_delimiter(string_token: str) -> str: """Returns the quote character used to delimit this token string. This function checks whether the token is a well-formed string. Args: string_token: The token to be parsed. Returns: A string containing solely the first quote delimit...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
984
_is_quote_delimiter_chosen_freely
def
function
def _is_quote_delimiter_chosen_freely(string_token: str) -> bool: """Was there a non-awkward option for the quote delimiter? Args: string_token: The quoted string whose delimiters are to be checked. Returns: Whether there was a choice in this token's quote character that would not ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
996
_get_quote_delimiter
ref
function
quote_delimiter = _get_quote_delimiter(string_token)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
1,000
_is_long_string
ref
function
and not _is_long_string(string_token)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/strings.py
pylint/checkers/strings.py
1,001
str_eval
ref
function
and unchosen_delimiter not in str_eval(string_token)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/threading_checker.py
pylint/checkers/threading_checker.py
17
ThreadingChecker
def
class
visit_with
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/threading_checker.py
pylint/checkers/threading_checker.py
44
only_required_for_messages
ref
function
@only_required_for_messages("useless-with-lock")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/threading_checker.py
pylint/checkers/threading_checker.py
45
visit_with
def
function
def visit_with(self, node: nodes.With) -> None: context_managers = (c for c, _ in node.items if isinstance(c, nodes.Call)) for context_manager in context_managers: if isinstance(context_manager, nodes.Call): infered_function = safe_infer(context_manager.func) ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/threading_checker.py
pylint/checkers/threading_checker.py
50
safe_infer
ref
function
infered_function = safe_infer(context_manager.func)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/threading_checker.py
pylint/checkers/threading_checker.py
53
qname
ref
function
qname = infered_function.qname()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/threading_checker.py
pylint/checkers/threading_checker.py
55
add_message
ref
function
self.add_message("useless-with-lock", node=node, args=qname)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/threading_checker.py
pylint/checkers/threading_checker.py
58
register
def
function
def register(linter: PyLinter) -> None: linter.register_checker(ThreadingChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/threading_checker.py
pylint/checkers/threading_checker.py
59
register_checker
ref
function
linter.register_checker(ThreadingChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/threading_checker.py
pylint/checkers/threading_checker.py
59
ThreadingChecker
ref
function
linter.register_checker(ThreadingChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
76
_unflatten
def
function
def _unflatten(iterable): for index, elem in enumerate(iterable): if isinstance(elem, Sequence) and not isinstance(elem, str): yield from _unflatten(elem) elif elem and not index: # We're interested only in the first element. yield elem
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
79
_unflatten
ref
function
yield from _unflatten(elem)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
85
_flatten_container
def
function
def _flatten_container(iterable): # Flatten nested containers into a single iterable for item in iterable: if isinstance(item, (list, tuple, types.GeneratorType)): yield from _flatten_container(item) else: yield item
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
89
_flatten_container
ref
function
yield from _flatten_container(item)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
94
_is_owner_ignored
def
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
107
root
ref
function
module_name = owner.root().name
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
108
root
ref
function
module_qname = owner.root().qname()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
108
qname
ref
function
module_qname = owner.root().qname()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
135
qname
ref
function
qname = owner.qname() if hasattr(owner, "qname") else ""
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
140
_node_names
def
function
def _node_names(node): if not hasattr(node, "locals"): return [] return node.locals.keys()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
146
register
ref
function
@_node_names.register(nodes.ClassDef)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
147
register
ref
function
@_node_names.register(astroid.Instance)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
148
_
def
function
def _(node): values = itertools.chain(node.instance_attrs.keys(), node.locals.keys()) try: mro = node.mro()[1:] except (NotImplementedError, TypeError, astroid.MroError): mro = node.ancestors() other_values = [value for cls in mro for value in _node_names(cls)] return itertools.cha...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
152
mro
ref
function
mro = node.mro()[1:]
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
154
ancestors
ref
function
mro = node.ancestors()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
156
_node_names
ref
function
other_values = [value for cls in mro for value in _node_names(cls)]
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
160
_string_distance
def
function
def _string_distance(seq1, seq2): seq2_length = len(seq2) row = list(range(1, seq2_length + 1)) + [0] for seq1_index, seq1_char in enumerate(seq1): last_row = row row = [0] * seq2_length + [seq1_index + 1] for seq2_index, seq2_char in enumerate(seq2): row[seq2_index] = ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
178
_similar_names
def
function
def _similar_names(owner, attrname, distance_threshold, max_choices): """Given an owner and a name, try to find similar names. The similar names are searched given a distance metric and only a given number of choices will be returned. """ possible_names = [] names = _node_names(owner) for ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
185
_node_names
ref
function
names = _node_names(owner)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
191
_string_distance
ref
function
distance = _string_distance(attrname, name)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
206
_missing_member_hint
def
function
def _missing_member_hint(owner, attrname, distance_threshold, max_choices): names = _similar_names(owner, attrname, distance_threshold, max_choices) if not names: # No similar name. return "" names = [repr(name) for name in names] if len(names) == 1: names_hint = ", ".join(names...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
207
_similar_names
ref
function
names = _similar_names(owner, attrname, distance_threshold, max_choices)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
410
_emit_no_member
def
function
def _emit_no_member( node, owner, owner_name, mixin_class_rgx: Pattern[str], ignored_mixins=_True, ignored_none=_True,
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
431
node_ignores_exception
ref
function
if node_ignores_exception(node, AttributeError):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
435
is_super
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
440
is_abstract
ref
function
owner.decorators or owner.is_abstract()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
444
has_dynamic_getattr
ref
function
if owner.has_dynamic_getattr():
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
448
metaclass
ref
class