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/imports.py | pylint/checkers/imports.py | 738 | add_ignored_message | ref | function | self.linter.add_ignored_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 743 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 747 | as_string | ref | function | f'first party import "{node.as_string()}"',
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 748 | as_string | ref | function | f'"{wrong_import[0][0].as_string()}"',
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 757 | add_ignored_message | ref | function | self.linter.add_ignored_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 762 | _get_imported_module | def | function | def _get_imported_module(self, importnode, modname):
try:
return importnode.do_import_module(modname)
except astroid.TooManyLevelsError:
if _ignore_import_failure(importnode, modname, self._ignored_modules):
return None
self.add_message("relative-b... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 764 | do_import_module | ref | function | return importnode.do_import_module(modname)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 766 | _ignore_import_failure | ref | function | if _ignore_import_failure(importnode, modname, self._ignored_modules):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 768 | add_message | ref | function | self.add_message("relative-beyond-top-level", node=importnode)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 771 | add_message | ref | function | self.add_message("syntax-error", line=importnode.lineno, args=message)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 774 | is_message_enabled | ref | function | if not self.linter.is_message_enabled("import-error"):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 776 | _ignore_import_failure | ref | function | if _ignore_import_failure(importnode, modname, self._ignored_modules):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 780 | is_from_fallback_block | ref | function | and is_from_fallback_block(importnode)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 784 | get_import_name | ref | function | dotted_modname = get_import_name(importnode, modname)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 785 | add_message | ref | function | self.add_message("import-error", args=repr(dotted_modname), node=importnode)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 788 | _add_imported_module | def | function | def _add_imported_module(
self, node: nodes.Import | nodes.ImportFrom, importedmodname: str
) -> None:
"""Notify an imported module, used to analyze dependencies."""
module_file = node.root().file
context_name = node.root().name
base = os.path.splitext(os.path.basename(mo... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 792 | root | ref | function | module_file = node.root().file
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 793 | root | ref | function | context_name = node.root().name
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 794 | splitext | ref | function | base = os.path.splitext(os.path.basename(module_file))[0]
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 794 | basename | ref | function | base = os.path.splitext(os.path.basename(module_file))[0]
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 797 | get_module_part | ref | function | importedmodname = astroid.modutils.get_module_part(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 803 | is_typing_guard | ref | function | in_type_checking_block = isinstance(node.parent, nodes.If) and is_typing_guard(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 808 | add_message | ref | function | self.add_message("import-self", node=node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 810 | is_standard_module | ref | function | elif not astroid.modutils.is_standard_module(importedmodname):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 826 | is_message_enabled | ref | function | not self.linter.is_message_enabled("cyclic-import", line=node.lineno)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 831 | _check_preferred_module | def | function | def _check_preferred_module(self, node, mod_path):
"""Check if the module has a preferred replacement."""
if mod_path in self.preferred_modules:
self.add_message(
"preferred-module",
node=node,
args=(self.preferred_modules[mod_path], mod_pa... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 834 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 840 | _check_import_as_rename | def | function | def _check_import_as_rename(self, node: nodes.Import | nodes.ImportFrom) -> None:
names = node.names
for name in names:
if not all(name):
return
splitted_packages = name[0].rsplit(".", maxsplit=1)
import_name = splitted_packages[-1]
al... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 853 | add_message | ref | function | self.add_message("useless-import-alias", node=node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 855 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 861 | _check_reimport | def | function | def _check_reimport(self, node, basename=None, level=None):
"""Check if the import is necessary (i.e. not already done)."""
if not self.linter.is_message_enabled("reimported"):
return
frame = node.frame(future=_True)
root = node.root()
contexts = [(frame, level)]... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 863 | is_message_enabled | ref | function | if not self.linter.is_message_enabled("reimported"):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 866 | frame | ref | function | frame = node.frame(future=True)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 867 | root | ref | function | root = node.root()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 874 | _get_first_import | ref | function | first = _get_first_import(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 878 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 882 | _report_external_dependencies | def | function | def _report_external_dependencies(self, sect, _, _dummy):
"""Return a verbatim layout for displaying dependencies."""
dep_info = _make_tree_defs(self._external_dependencies_info().items())
if not dep_info:
raise EmptyReportError()
tree_str = _repr_tree_defs(dep_info)
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 884 | _make_tree_defs | ref | function | dep_info = _make_tree_defs(self._external_dependencies_info().items())
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 884 | _external_dependencies_info | ref | function | dep_info = _make_tree_defs(self._external_dependencies_info().items())
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 886 | EmptyReportError | ref | function | raise EmptyReportError()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 887 | _repr_tree_defs | ref | function | tree_str = _repr_tree_defs(dep_info)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 888 | VerbatimText | ref | function | sect.append(VerbatimText(tree_str))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 890 | _report_dependencies_graph | def | function | def _report_dependencies_graph(self, sect, _, _dummy):
"""Write dependencies as a dot (graphviz) file."""
dep_info = self.linter.stats.dependencies
if not dep_info or not (
self.linter.config.import_graph
or self.linter.config.ext_import_graph
or self.lint... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 898 | EmptyReportError | ref | function | raise EmptyReportError()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 901 | _make_graph | ref | function | _make_graph(filename, dep_info, sect, "")
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 904 | _make_graph | ref | function | _make_graph(filename, self._external_dependencies_info(), sect, "external ")
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 904 | _external_dependencies_info | ref | function | _make_graph(filename, self._external_dependencies_info(), sect, "external ")
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 907 | _make_graph | ref | function | _make_graph(filename, self._internal_dependencies_info(), sect, "internal ")
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 907 | _internal_dependencies_info | ref | function | _make_graph(filename, self._internal_dependencies_info(), sect, "internal ")
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 909 | _filter_dependencies_graph | def | function | def _filter_dependencies_graph(self, internal):
"""Build the internal or the external dependency graph."""
graph = collections.defaultdict(set)
for importee, importers in self.linter.stats.dependencies.items():
for importer in importers:
package = self._module_pkg... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 921 | _external_dependencies_info | def | function | def _external_dependencies_info(self):
"""Return cached external dependencies information or build and
cache them.
"""
return self._filter_dependencies_graph(internal=_False)
@astroid.decorators.cached
def _internal_dependencies_info(self):
"""Return cached internal ... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 925 | _filter_dependencies_graph | ref | function | return self._filter_dependencies_graph(internal=False)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 928 | _internal_dependencies_info | def | function | def _internal_dependencies_info(self):
"""Return cached internal dependencies information or build and
cache them.
"""
return self._filter_dependencies_graph(internal=_True)
def _check_wildcard_imports(self, node, imported_module):
if node.root().package:
# S... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 932 | _filter_dependencies_graph | ref | function | return self._filter_dependencies_graph(internal=True)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 934 | _check_wildcard_imports | def | function | def _check_wildcard_imports(self, node, imported_module):
if node.root().package:
# Skip the check if in __init__.py issue #2026
return
wildcard_import_is_allowed = self._wildcard_import_is_allowed(imported_module)
for name, _ in node.names:
if name == "*... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 935 | root | ref | function | if node.root().package:
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 939 | _wildcard_import_is_allowed | ref | function | wildcard_import_is_allowed = self._wildcard_import_is_allowed(imported_module)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 942 | add_message | ref | function | self.add_message("wildcard-import", args=node.modname, node=node)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 944 | _wildcard_import_is_allowed | def | function | def _wildcard_import_is_allowed(self, imported_module):
return (
self.linter.config.allow_wildcard_with_all
and imported_module is not None
and "__all__" in imported_module.locals
)
def _check_toplevel(self, node):
"""Check whether the import is made ... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 951 | _check_toplevel | def | function | def _check_toplevel(self, node):
"""Check whether the import is made outside the module toplevel."""
# If the scope of the import is a module, then obviously it is
# not outside the module toplevel.
if isinstance(node.scope(), nodes.Module):
return
module_names =... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 955 | scope | ref | function | if isinstance(node.scope(), nodes.Module):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 971 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 976 | register | def | function | def register(linter: PyLinter) -> None:
linter.register_checker(ImportsChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 977 | register_checker | ref | function | linter.register_checker(ImportsChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/imports.py | pylint/checkers/imports.py | 977 | ImportsChecker | ref | function | linter.register_checker(ImportsChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/lambda_expressions.py | pylint/checkers/lambda_expressions.py | 18 | LambdaExpressionChecker | def | class | visit_assign visit_namedexpr visit_call |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/lambda_expressions.py | pylint/checkers/lambda_expressions.py | 39 | visit_assign | def | function | def visit_assign(self, node: nodes.Assign) -> None:
"""Check if lambda expression is assigned to a variable."""
if isinstance(node.targets[0], nodes.AssignName) and isinstance(
node.value, nodes.Lambda
):
self.add_message(
"unnecessary-lambda-assignmen... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/lambda_expressions.py | pylint/checkers/lambda_expressions.py | 44 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/lambda_expressions.py | pylint/checkers/lambda_expressions.py | 65 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/lambda_expressions.py | pylint/checkers/lambda_expressions.py | 71 | visit_namedexpr | def | function | def visit_namedexpr(self, node: nodes.NamedExpr) -> None:
if isinstance(node.target, nodes.AssignName) and isinstance(
node.value, nodes.Lambda
):
self.add_message(
"unnecessary-lambda-assignment",
node=node.value,
confidence=HI... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/lambda_expressions.py | pylint/checkers/lambda_expressions.py | 75 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/lambda_expressions.py | pylint/checkers/lambda_expressions.py | 81 | visit_call | def | function | def visit_call(self, node: nodes.Call) -> None:
"""Check if lambda expression is called directly."""
if isinstance(node.func, nodes.Lambda):
self.add_message(
"unnecessary-direct-lambda-call",
node=node,
confidence=HIGH,
)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/lambda_expressions.py | pylint/checkers/lambda_expressions.py | 84 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/lambda_expressions.py | pylint/checkers/lambda_expressions.py | 91 | register | def | function | def register(linter: PyLinter) -> None:
linter.register_checker(LambdaExpressionChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/lambda_expressions.py | pylint/checkers/lambda_expressions.py | 92 | register_checker | ref | function | linter.register_checker(LambdaExpressionChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/lambda_expressions.py | pylint/checkers/lambda_expressions.py | 92 | LambdaExpressionChecker | ref | function | linter.register_checker(LambdaExpressionChecker(linter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 101 | is_method_call | def | function | def is_method_call(func, types=(), methods=()):
"""Determines if a BoundMethod node represents a method call.
Args:
func (astroid.BoundMethod): The BoundMethod AST node to check.
types (Optional[String]): Optional sequence of caller type names to restrict check.
methods (Optional[String]): Op... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 121 | LoggingChecker | def | class | visit_module visit_importfrom visit_import visit_call _check_log_method _helper_string _is_operand_literal_str _check_call_func _check_format_string |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 151 | visit_module | def | function | def visit_module(self, _: nodes.Module) -> None:
"""Clears any state left in this checker from last module checked."""
# The code being checked can just as easily "import logging as foo",
# so it is necessary to process the imports and store in this field
# what name the logging modu... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 168 | visit_importfrom | def | function | def visit_importfrom(self, node: nodes.ImportFrom) -> None:
"""Checks to see if a module uses a non-Python logging module."""
try:
logging_name = self._from_imports[node.modname]
for module, as_name in node.names:
if module == logging_name:
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 178 | visit_import | def | function | def visit_import(self, node: nodes.Import) -> None:
"""Checks to see if this module uses Python's built-in logging."""
for module, as_name in node.names:
if module in self._logging_modules:
self._logging_names.add(as_name or module)
def visit_call(self, node: nodes.C... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 184 | visit_call | def | function | def visit_call(self, node: nodes.Call) -> None:
"""Checks calls to logging methods."""
def is_logging_name():
return (
isinstance(node.func, nodes.Attribute)
and isinstance(node.func.expr, nodes.Name)
and node.func.expr.name in self._loggi... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 187 | is_logging_name | def | function | def is_logging_name():
return (
isinstance(node.func, nodes.Attribute)
and isinstance(node.func.expr, nodes.Name)
and node.func.expr.name in self._logging_names
)
def is_logger_class():
for inferred in infer_all(node.fu... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 194 | is_logger_class | def | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 195 | infer_all | ref | function | for inferred in infer_all(node.func):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 199 | qname | ref | function | parent.qname() == "logging.Logger"
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 201 | qname | ref | function | ancestor.qname() == "logging.Logger"
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 202 | ancestors | ref | function | for ancestor in parent.ancestors()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 208 | is_logging_name | ref | function | if is_logging_name():
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 211 | is_logger_class | ref | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 214 | _check_log_method | ref | function | self._check_log_method(node, name)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 216 | _check_log_method | def | function | def _check_log_method(self, node, name):
"""Checks calls to logging.log(level, format, *format_args)."""
if name == "log":
if node.starargs or node.kwargs or len(node.args) < 2:
# Either a malformed call, star args, or double-star args. Beyond
# the scope ... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 240 | _is_operand_literal_str | ref | function | if self._is_operand_literal_str(utils.safe_infer(operand))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 240 | safe_infer | ref | function | if self._is_operand_literal_str(utils.safe_infer(operand))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 244 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 247 | _helper_string | ref | function | args=(self._helper_string(node),),
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 250 | _check_call_func | ref | function | self._check_call_func(node.args[format_pos])
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 252 | _check_format_string | ref | function | self._check_format_string(node, format_pos)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 254 | add_message | ref | function | self.add_message(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/logging.py | pylint/checkers/logging.py | 257 | _helper_string | ref | function | args=(self._helper_string(node),),
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.