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
2,158
visit_setcomp
def
function
def visit_setcomp(self, node: nodes.SetComp) -> None: for gen in node.generators: self._check_iterable(gen.iter, check_async=gen.is_async) @only_required_for_messages("not-an-iterable") def visit_generatorexp(self, node: nodes.GeneratorExp) -> None: for gen in node.generators: ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
2,160
_check_iterable
ref
function
self._check_iterable(gen.iter, check_async=gen.is_async)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
2,162
only_required_for_messages
ref
function
@only_required_for_messages("not-an-iterable")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
2,163
visit_generatorexp
def
function
def visit_generatorexp(self, node: nodes.GeneratorExp) -> None: for gen in node.generators: self._check_iterable(gen.iter, check_async=gen.is_async)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
2,165
_check_iterable
ref
function
self._check_iterable(gen.iter, check_async=gen.is_async)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
2,168
register
def
function
def register(linter: PyLinter) -> None: linter.register_checker(TypeChecker(linter)) linter.register_checker(IterableChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
2,169
register_checker
ref
function
linter.register_checker(TypeChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
2,169
TypeChecker
ref
function
linter.register_checker(TypeChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
2,170
register_checker
ref
function
linter.register_checker(IterableChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/typecheck.py
pylint/checkers/typecheck.py
2,170
IterableChecker
ref
function
linter.register_checker(IterableChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
57
_BadChar
def
class
description human_code
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
66
description
def
function
def description(self) -> str: """Used for the detailed error message description.""" return ( f"Invalid unescaped character {self.name}, " f'use "{self.escaped}" instead.' ) def human_code(self) -> str: """Used to generate the human readable error message...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
73
human_code
def
function
def human_code(self) -> str: """Used to generate the human readable error message.""" return f"invalid-character-{self.name}"
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
80
_BadChar
ref
function
_BadChar(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
90
_BadChar
ref
function
_BadChar(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
100
_BadChar
ref
function
_BadChar(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
110
_BadChar
ref
function
_BadChar(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
120
_BadChar
ref
function
_BadChar(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
127
_BadChar
ref
function
_BadChar(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
140
_line_length
def
function
def _line_length(line: _StrLike, codec: str) -> int: """Get the length of a string like line as displayed in an editor.""" if isinstance(line, bytes): decoded = _remove_bom(line, codec).decode(codec, "replace") else: decoded = line stripped = decoded.rstrip("\n") if stripped != dec...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
143
_remove_bom
ref
function
decoded = _remove_bom(line, codec).decode(codec, "replace")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
155
_map_positions_to_result
def
function
def _map_positions_to_result( line: _StrLike, search_dict: dict[_StrLike, _BadChar], new_line: _StrLike, byte_str_length: int = 1,
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
213
_normalize_codec_name
def
function
def _normalize_codec_name(codec: str) -> str: """Make sure the codec name is always given as defined in the BOM dict.""" return UTF_NAME_REGEX_COMPILED.sub(r"utf-\1\2", codec).lower()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
218
_remove_bom
def
function
def _remove_bom(encoded: bytes, encoding: str) -> bytes: """Remove the bom if given from a line.""" if not encoding.startswith("utf"): return encoded bom = UNICODE_BOMS[encoding] if encoded.startswith(bom): return encoded[len(bom) :] return encoded
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
228
_encode_without_bom
def
function
def _encode_without_bom(string: str, encoding: str) -> bytes: """Encode a string but remove the BOM.""" return _remove_bom(string.encode(encoding), encoding)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
230
_remove_bom
ref
function
return _remove_bom(string.encode(encoding), encoding)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
233
_byte_to_str_length
def
function
def _byte_to_str_length(codec: str) -> int: """Return how many byte are usually(!) a character point.""" if codec.startswith("utf-32"): return 4 if codec.startswith("utf-16"): return 2 return 1
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
244
_cached_encode_search
def
function
def _cached_encode_search(string: str, encoding: str) -> bytes: """A cached version of encode used for search pattern.""" return _encode_without_bom(string, encoding)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
246
_encode_without_bom
ref
function
return _encode_without_bom(string, encoding)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
249
_fix_utf16_32_line_stream
def
function
def _fix_utf16_32_line_stream(steam: Iterable[bytes], codec: str) -> Iterable[bytes]: """Handle line ending for UTF16 and UTF32 correctly. Currently, Python simply strips the required zeros after \n after the line ending. Leading to lines that can't be decoded properly """ if not codec.startswith("...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
261
_cached_encode_search
ref
function
new_line = _cached_encode_search("\n", codec)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
279
extract_codec_from_bom
def
function
def extract_codec_from_bom(first_line: bytes) -> str: """Try to extract the codec (unicode only) by checking for the BOM. For details about BOM see https://unicode.org/faq/utf_bom.html#BOM Args: first_line: the first line of a file Returns: a codec name Raises: ValueError...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
300
UnicodeChecker
def
class
_is_invalid_codec _is_unicode _find_line_matches _determine_codec _check_codec _check_invalid_chars _check_bidi_chars process_module
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
366
description
ref
function
bad_char.description(),
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
367
human_code
ref
function
bad_char.human_code(),
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
375
_is_invalid_codec
def
function
def _is_invalid_codec(codec: str) -> bool: return codec.startswith("utf-16") or codec.startswith("utf-32") @staticmethod def _is_unicode(codec: str) -> bool: return codec.startswith("utf") @classmethod def _find_line_matches(cls, line: bytes, codec: str) -> dict[int, _BadChar]: ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
379
_is_unicode
def
function
def _is_unicode(codec: str) -> bool: return codec.startswith("utf") @classmethod def _find_line_matches(cls, line: bytes, codec: str) -> dict[int, _BadChar]: """Find all matches of BAD_CHARS within line. Args: line: the input codec: that will be used to conv...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
383
_find_line_matches
def
function
def _find_line_matches(cls, line: bytes, codec: str) -> dict[int, _BadChar]: """Find all matches of BAD_CHARS within line. Args: line: the input codec: that will be used to convert line/or search string into Return: A dictionary with the column offset an...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
398
_map_positions_to_result
ref
function
return _map_positions_to_result(line_search, search_dict, "\n")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
408
_cached_encode_search
ref
function
_cached_encode_search(char.unescaped, codec)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
411
_map_positions_to_result
ref
function
return _map_positions_to_result(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
414
_cached_encode_search
ref
function
_cached_encode_search("\n", codec),
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
415
_byte_to_str_length
ref
function
byte_str_length=_byte_to_str_length(codec),
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
419
_determine_codec
def
function
def _determine_codec(stream: io.BytesIO) -> tuple[str, int]: """Determine the codec from the given stream. first tries https://www.python.org/dev/peps/pep-0263/ and if this fails also checks for BOMs of UTF-16 and UTF-32 to be future-proof. Args: stream: The byt...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
448
seek
ref
function
stream.seek(0)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
450
extract_codec_from_bom
ref
function
codec = extract_codec_from_bom(stream.readline())
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
450
readline
ref
function
codec = extract_codec_from_bom(stream.readline())
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
457
_normalize_codec_name
ref
function
return _normalize_codec_name(codec), codec_definition_line
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
459
_check_codec
def
function
def _check_codec(self, codec: str, codec_definition_line: int) -> None: """Check validity of the codec.""" if codec != "utf-8": msg = "bad-file-encoding" if self._is_invalid_codec(codec): msg = "invalid-unicode-codec" self.add_message( ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
463
_is_invalid_codec
ref
function
if self._is_invalid_codec(codec):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
465
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
476
_check_invalid_chars
def
function
def _check_invalid_chars(self, line: bytes, lineno: int, codec: str) -> None: """Look for chars considered bad.""" matches = self._find_line_matches(line, codec) for col, char in matches.items(): self.add_message( char.human_code(), # Currently Nod...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
478
_find_line_matches
ref
function
matches = self._find_line_matches(line, codec)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
480
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
481
human_code
ref
function
char.human_code(),
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
491
_check_bidi_chars
def
function
def _check_bidi_chars(self, line: bytes, lineno: int, codec: str) -> None: """Look for Bidirectional Unicode, if we use unicode.""" if not self._is_unicode(codec): return for dangerous in BIDI_UNICODE: if _cached_encode_search(dangerous, codec) in line: ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
493
_is_unicode
ref
function
if not self._is_unicode(codec):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
496
_cached_encode_search
ref
function
if _cached_encode_search(dangerous, codec) in line:
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
501
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
510
_line_length
ref
function
end_col_offset=_line_length(line, codec),
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
517
process_module
def
function
def process_module(self, node: nodes.Module) -> None: """Perform the actual check by checking module stream.""" with node.stream() as stream: codec, codec_line = self._determine_codec(stream) self._check_codec(codec, codec_line) stream.seek(0) # Chec...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
519
stream
ref
function
with node.stream() as stream:
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
520
_determine_codec
ref
function
codec, codec_line = self._determine_codec(stream)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
521
_check_codec
ref
function
self._check_codec(codec, codec_line)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
523
seek
ref
function
stream.seek(0)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
527
_fix_utf16_32_line_stream
ref
function
_fix_utf16_32_line_stream(stream, codec), start=1
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
530
_remove_bom
ref
function
line = _remove_bom(line, codec)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
531
_check_bidi_chars
ref
function
self._check_bidi_chars(line, lineno, codec)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
532
_check_invalid_chars
ref
function
self._check_invalid_chars(line, lineno, codec)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
536
register_checker
ref
function
linter.register_checker(UnicodeChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unicode.py
pylint/checkers/unicode.py
536
UnicodeChecker
ref
function
linter.register_checker(UnicodeChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unsupported_version.py
pylint/checkers/unsupported_version.py
25
UnsupportedVersionChecker
def
class
open visit_joinedstr visit_decorators _check_typing_final
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unsupported_version.py
pylint/checkers/unsupported_version.py
52
only_required_for_messages
ref
function
@only_required_for_messages("using-f-string-in-unsupported-version")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unsupported_version.py
pylint/checkers/unsupported_version.py
53
visit_joinedstr
def
function
def visit_joinedstr(self, node: nodes.JoinedStr) -> None: """Check f-strings.""" if not self._py36_plus: self.add_message("using-f-string-in-unsupported-version", node=node) @only_required_for_messages("using-final-decorator-in-unsupported-version") def visit_decorators(self, no...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unsupported_version.py
pylint/checkers/unsupported_version.py
56
add_message
ref
function
self.add_message("using-f-string-in-unsupported-version", node=node)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unsupported_version.py
pylint/checkers/unsupported_version.py
58
only_required_for_messages
ref
function
@only_required_for_messages("using-final-decorator-in-unsupported-version")
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unsupported_version.py
pylint/checkers/unsupported_version.py
59
visit_decorators
def
function
def visit_decorators(self, node: nodes.Decorators) -> None: """Check decorators.""" self._check_typing_final(node) def _check_typing_final(self, node: nodes.Decorators) -> None: """Add a message when the `typing.final` decorator is used and the py-version is lower than 3.8. ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unsupported_version.py
pylint/checkers/unsupported_version.py
61
_check_typing_final
ref
function
self._check_typing_final(node)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unsupported_version.py
pylint/checkers/unsupported_version.py
63
_check_typing_final
def
function
def _check_typing_final(self, node: nodes.Decorators) -> None: """Add a message when the `typing.final` decorator is used and the py-version is lower than 3.8. """ if self._py38_plus: return decorators = [] for decorator in node.get_children(): ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unsupported_version.py
pylint/checkers/unsupported_version.py
71
get_children
ref
function
for decorator in node.get_children():
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unsupported_version.py
pylint/checkers/unsupported_version.py
72
safe_infer
ref
function
inferred = safe_infer(decorator)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unsupported_version.py
pylint/checkers/unsupported_version.py
73
qname
ref
function
if inferred and inferred.qname() == "typing.final":
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unsupported_version.py
pylint/checkers/unsupported_version.py
76
uninferable_final_decorators
ref
function
for decorator in decorators or uninferable_final_decorators(node):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unsupported_version.py
pylint/checkers/unsupported_version.py
77
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unsupported_version.py
pylint/checkers/unsupported_version.py
82
register
def
function
def register(linter: PyLinter) -> None: linter.register_checker(UnsupportedVersionChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unsupported_version.py
pylint/checkers/unsupported_version.py
83
register_checker
ref
function
linter.register_checker(UnsupportedVersionChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/unsupported_version.py
pylint/checkers/unsupported_version.py
83
UnsupportedVersionChecker
ref
function
linter.register_checker(UnsupportedVersionChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
232
NoSuchArgumentError
def
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
236
InferredTypeError
def
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
240
is_inside_lambda
def
function
def is_inside_lambda(node: nodes.NodeNG) -> bool: """Return whether the given node is inside a lambda.""" warnings.warn( "utils.is_inside_lambda will be removed in favour of calling " "utils.get_node_first_ancestor_of_type(x, nodes.Lambda) in pylint 3.0", DeprecationWarning, ) re...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
247
node_ancestors
ref
function
return any(isinstance(parent, nodes.Lambda) for parent in node.node_ancestors())
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
250
get_all_elements
def
function
def get_all_elements( node: nodes.NodeNG,
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
256
get_all_elements
ref
function
yield from get_all_elements(child)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
261
is_super
def
function
def is_super(node: nodes.NodeNG) -> bool: """Return _True if the node is referencing the "super" builtin function.""" if getattr(node, "name", None) == "super" and node.root().name == "builtins": return _True return _False
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
263
root
ref
function
if getattr(node, "name", None) == "super" and node.root().name == "builtins":
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
268
is_error
def
function
def is_error(node: nodes.FunctionDef) -> bool: """Return true if the given function node only raises an exception.""" return len(node.body) == 1 and isinstance(node.body[0], nodes.Raise)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
277
is_builtin_object
def
function
def is_builtin_object(node: nodes.NodeNG) -> bool: """Returns _True if the given node is an object from the __builtin__ module.""" return node and node.root().name == "builtins"
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
279
root
ref
function
return node and node.root().name == "builtins"
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
282
is_builtin
def
function
def is_builtin(name: str) -> bool: """Return true if <name> could be considered as a builtin defined by python.""" return name in builtins or name in SPECIAL_BUILTINS # type: ignore[attr-defined]
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/utils.py
pylint/checkers/utils.py
287
is_defined_in_scope
def
function
def is_defined_in_scope( var_node: nodes.NodeNG, varname: str, scope: nodes.NodeNG,