fname
stringlengths
63
176
rel_fname
stringclasses
706 values
line
int64
-1
4.5k
name
stringlengths
1
81
kind
stringclasses
2 values
category
stringclasses
2 values
info
stringlengths
0
77.9k
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
560
stripped_lines
def
function
def stripped_lines( lines: Iterable[str], ignore_comments: bool, ignore_docstrings: bool, ignore_imports: bool, ignore_signatures: bool,
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
577
parse
ref
function
tree = astroid.parse("".join(lines))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
592
_get_functions
def
function
def _get_functions( functions: List[nodes.NodeNG], tree: nodes.NodeNG ) -> List[nodes.NodeNG]: """Recursively get all functions including nested in the classes from the tree.""" for node in tree.body: if isinstance(node, (nodes.FunctionDef, nodes.Asyn...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
605
_get_functions
ref
function
_get_functions(functions, node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
609
_get_functions
ref
function
functions = _get_functions([], tree)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
650
LineSpecifs
ref
function
LineSpecifs(text=line, line_number=LineNumber(lineno - 1))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
650
LineNumber
ref
function
LineSpecifs(text=line, line_number=LineNumber(lineno - 1))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
656
LineSet
def
class
__init__ __str__ __len__ __getitem__ __lt__ __hash__ __eq__ stripped_lines real_lines
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
673
stripped_lines
ref
function
self._stripped_lines = stripped_lines(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
698
stripped_lines
def
function
def stripped_lines(self): return self._stripped_lines @property def real_lines(self): return self._real_lines
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
702
real_lines
def
function
def real_lines(self): return self._real_lines
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
717
report_similarities
def
function
def report_similarities( sect, stats: LinterStats, old_stats: Optional[LinterStats],
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
724
table_lines_from_stats
ref
function
lines += table_lines_from_stats(stats, old_stats, "duplicated_lines")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
725
Table
ref
function
sect.append(Table(children=lines, cols=4, rheaders=1, cheaders=1))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
729
SimilarChecker
def
class
__init__ set_option open process_module close get_map_data reduce_map_data
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
803
set_option
def
function
def set_option(self, optname, value, action=None, optdict=None): """Method called to set an option (registered in the options list). Overridden to report options setting to Similar """ BaseChecker.set_option(self, optname, value, action, optdict) if optname == "min-similarit...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
808
set_option
ref
function
BaseChecker.set_option(self, optname, value, action, optdict)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
823
reset_duplicated_lines
ref
function
self.linter.stats.reset_duplicated_lines()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
825
process_module
def
function
def process_module(self, node: nodes.Module) -> None: """Process a module. the module's content is accessible via the stream object stream must implement the readlines method """ if self.linter.current_name is None: warnings.warn( ( ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
840
stream
ref
function
with node.stream() as stream:
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
841
append_stream
ref
function
self.append_stream(self.linter.current_name, stream, node.file_encoding) # type: ignore[arg-type]
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
848
_compute_sims
ref
function
for num, couples in self._compute_sims():
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
859
add_message
ref
function
self.add_message("R0801", args=(len(couples), "\n".join(msg)))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
864
get_map_data
def
function
def get_map_data(self): """Returns the data we can use for a map/reduce process. In this case we are returning this instance's Linesets, that is all file information that will later be used for vectorisation. """ return self.linesets def combine_mapreduce_data(self, lin...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
866
get_map_data
ref
function
return Similar.get_map_data(self)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
868
reduce_map_data
def
function
def reduce_map_data(self, linter, data): """Reduces and recombines data into a format that we can report on. The partner function of get_map_data() """ recombined = SimilarChecker(linter) recombined.min_lines = self.min_lines recombined.ignore_comments = self.ignore_...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
873
SimilarChecker
ref
function
recombined = SimilarChecker(linter)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
880
combine_mapreduce_data
ref
function
Similar.combine_mapreduce_data(recombined, linesets_collection=data)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
884
register
def
function
def register(linter: "PyLinter") -> None: linter.register_checker(SimilarChecker(linter))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
885
register_checker
ref
function
linter.register_checker(SimilarChecker(linter))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
885
SimilarChecker
ref
function
linter.register_checker(SimilarChecker(linter))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
888
usage
def
function
def usage(status=0): """Display command line usage information.""" print("finds copy pasted blocks in a set of files") print() print( "Usage: symilar [-d|--duplicates min_duplicated_lines] \
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
899
Run
def
function
def Run(argv=None): """Standalone command line access point.""" if argv is None: argv = sys.argv[1:] s_opts = "hdi" l_opts = ( "help", "duplicates=", "ignore-comments", "ignore-imports", "ignore-docstrings", "ignore-signatures", ) min_line...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
923
usage
ref
function
usage()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
933
usage
ref
function
usage(1)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
934
Similar
ref
function
sim = Similar(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
939
append_stream
ref
function
sim.append_stream(filename, stream)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
940
run
ref
function
sim.run()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/similar.py
pylint/checkers/similar.py
945
Run
ref
function
Run()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
58
EmailFilter
def
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
61
URLFilter
def
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
64
WikiWordFilter
def
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
67
Filter
def
class
_skip
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
68
_skip
def
function
def _skip(self, word): raise NotImplementedError class Chunker: # type: ignore[no-redef] pass def get_tokenizer( tag=None, chunkers=None, filters=None ): # pylint: disable=unused-argument return Filter()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
71
Chunker
def
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
74
get_tokenizer
def
function
def get_tokenizer( tag=None, chunkers=None, filters=None ): # pylint: disable=unused-argument return Filter()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
77
Filter
ref
function
return Filter()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
81
Broker
ref
function
br = enchant.Broker()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
82
list_dicts
ref
function
dicts = br.list_dicts()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
93
WordsWithDigitsFilter
def
class
_skip
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
96
_skip
def
function
def _skip(self, word): raise NotImplementedError class Chunker: # type: ignore[no-redef] pass def get_tokenizer( tag=None, chunkers=None, filters=None ): # pylint: disable=unused-argument return Filter()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
100
WordsWithUnderscores
def
class
_skip
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
106
_skip
def
function
def _skip(self, word): raise NotImplementedError class Chunker: # type: ignore[no-redef] pass def get_tokenizer( tag=None, chunkers=None, filters=None ): # pylint: disable=unused-argument return Filter()
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
110
RegExFilter
def
class
_skip
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
120
_skip
def
function
def _skip(self, word) -> bool: return bool(self._pattern.match(word))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
124
CamelCasedWord
def
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
135
SphinxDirectives
def
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
147
ForwardSlashChunker
def
class
next _next
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
173
_next
def
function
def _next(self): while _True: if "/" not in self._text: return (self._text, 0) pre_text, post_text = self._text.split("/", 1) if not pre_text or not post_text: break if not pre_text[-1].isalpha() or not post_text[0].isalpha(): ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
189
_strip_code_flanked_in_backticks
def
function
def _strip_code_flanked_in_backticks(line: str) -> str: """Alter line so code flanked in backticks is ignored. Pyenchant automatically strips backticks when parsing tokens, so this cannot be done at the individual filter level. """ def replace_code_but_leave_surrounding_characters(match_obj) -> st...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
196
replace_code_but_leave_surrounding_characters
def
function
def replace_code_but_leave_surrounding_characters(match_obj) -> str: return match_obj.group(1) + match_obj.group(5) return CODE_FLANKED_IN_BACKTICK_REGEX.sub( replace_code_but_leave_surrounding_characters, line )
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
204
SpellingChecker
def
class
open close _check_spelling process_tokens visit_module visit_classdef visit_functiondef _check_docstring
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
314
expanduser
ref
function
self.config.spelling_private_dict_file = os.path.expanduser(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
319
DictWithPWL
ref
function
self.spelling_dict = enchant.DictWithPWL(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
326
Dict
ref
function
self.spelling_dict = enchant.Dict(dict_name)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
331
get_tokenizer
ref
function
self.tokenizer = get_tokenizer(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
350
_check_spelling
def
function
def _check_spelling(self, msgid, line, line_num): original_line = line try: initial_space = re.search(r"^[^\S]\s*", line).regs[0][1] except (IndexError, AttributeError): initial_space = 0 if line.strip().startswith("#") and "docstring" not in msgid: ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
369
_strip_code_flanked_in_backticks
ref
function
line = _strip_code_flanked_in_backticks(line)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
371
tokenizer
ref
function
for word, word_start_at in self.tokenizer(line.strip()):
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
386
check
ref
function
if self.spelling_dict.check(lower_cased_word):
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
393
check
ref
function
if self.spelling_dict.check(word):
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
396
add_message
ref
function
self.add_message(
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
408
suggest
ref
function
suggestions = self.spelling_dict.suggest(word)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
423
add_message
ref
function
self.add_message(msgid, line=line_num, args=args)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
425
process_tokens
def
function
def process_tokens(self, tokens): if not self.initialized: return # Process tokens and look for comments. for (tok_type, token, (start_row, _), _, _) in tokens: if tok_type == tokenize.COMMENT: if start_row == 1 and token.startswith("#!/"): ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
438
_check_spelling
ref
function
self._check_spelling("wrong-spelling-in-comment", token, start_row)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
440
check_messages
ref
function
@check_messages("wrong-spelling-in-docstring")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
441
visit_module
def
function
def visit_module(self, node: nodes.Module) -> None: if not self.initialized: return self._check_docstring(node) @check_messages("wrong-spelling-in-docstring") def visit_classdef(self, node: nodes.ClassDef) -> None: if not self.initialized: return self...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
444
_check_docstring
ref
function
self._check_docstring(node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
446
check_messages
ref
function
@check_messages("wrong-spelling-in-docstring")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
447
visit_classdef
def
class
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
450
_check_docstring
ref
function
self._check_docstring(node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
452
check_messages
ref
function
@check_messages("wrong-spelling-in-docstring")
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
453
visit_functiondef
def
function
def visit_functiondef(self, node: nodes.FunctionDef) -> None: if not self.initialized: return self._check_docstring(node) visit_asyncfunctiondef = visit_functiondef def _check_docstring(self, node): """Check the node has any spelling errors.""" docstring = node....
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
456
_check_docstring
ref
function
self._check_docstring(node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
460
_check_docstring
def
function
def _check_docstring(self, node): """Check the node has any spelling errors.""" docstring = node.doc if not docstring: return start_line = node.lineno + 1 # Go through lines of docstring for idx, line in enumerate(docstring.splitlines()): sel...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
470
_check_spelling
ref
function
self._check_spelling("wrong-spelling-in-docstring", line, start_line + idx)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
473
register
def
function
def register(linter: "PyLinter") -> None: linter.register_checker(SpellingChecker(linter))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
474
register_checker
ref
function
linter.register_checker(SpellingChecker(linter))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/spelling.py
pylint/checkers/spelling.py
474
SpellingChecker
ref
function
linter.register_checker(SpellingChecker(linter))
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py
pylint/checkers/stdlib.py
317
_check_mode_str
def
function
def _check_mode_str(mode): # check type if not isinstance(mode, str): return _False # check syntax modes = set(mode) _mode = "rwatb+Ux" creating = "x" in modes if modes - set(_mode) or len(mode) > len(modes): return _False # check logic reading = "r" in modes writ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py
pylint/checkers/stdlib.py
347
StdlibChecker
def
class
__init__ _check_bad_thread_instantiation _check_for_preexec_fn_in_popen _check_for_check_kw_in_run _check_shallow_copy_environ visit_call visit_unaryop visit_if visit_ifexp visit_boolop visit_functiondef _check_lru_cache_decorators _check_redundant_assert _check_datetime _check_open_mode _check_open_encoded _check_env_...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py
pylint/checkers/stdlib.py
489
_check_bad_thread_instantiation
def
function
def _check_bad_thread_instantiation(self, node): if not node.kwargs and not node.keywords and len(node.args) <= 1: self.add_message("bad-thread-instantiation", node=node) def _check_for_preexec_fn_in_popen(self, node): if node.keywords: for keyword in node.keywords: ...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py
pylint/checkers/stdlib.py
491
add_message
ref
function
self.add_message("bad-thread-instantiation", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py
pylint/checkers/stdlib.py
493
_check_for_preexec_fn_in_popen
def
function
def _check_for_preexec_fn_in_popen(self, node): if node.keywords: for keyword in node.keywords: if keyword.arg == "preexec_fn": self.add_message("subprocess-popen-preexec-fn", node=node) def _check_for_check_kw_in_run(self, node): kwargs = {keywor...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py
pylint/checkers/stdlib.py
497
add_message
ref
function
self.add_message("subprocess-popen-preexec-fn", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py
pylint/checkers/stdlib.py
499
_check_for_check_kw_in_run
def
function
def _check_for_check_kw_in_run(self, node): kwargs = {keyword.arg for keyword in (node.keywords or ())} if "check" not in kwargs: self.add_message("subprocess-run-check", node=node) def _check_shallow_copy_environ(self, node: nodes.Call) -> None: arg = utils.get_argument_fro...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py
pylint/checkers/stdlib.py
502
add_message
ref
function
self.add_message("subprocess-run-check", node=node)
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py
pylint/checkers/stdlib.py
504
_check_shallow_copy_environ
def
function
def _check_shallow_copy_environ(self, node: nodes.Call) -> None: arg = utils.get_argument_from_call(node, position=0) try: inferred_args = arg.inferred() except astroid.InferenceError: return for inferred in inferred_args: if inferred.qname() == OS...
playground/e9b22a58-260b-483f-88d7-7a5fe9f8b1d4/pylint/pylint/checkers/stdlib.py
pylint/checkers/stdlib.py
505
get_argument_from_call
ref
function
arg = utils.get_argument_from_call(node, position=0)