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/variables.py
pylint/checkers/variables.py
2,411
is_default_argument
ref
function
if utils.is_default_argument(node, node_scope):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,412
frame
ref
function
node_scope = node_scope.parent.frame(future=True)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,421
lookup
ref
function
assign_scope, stmts = node.lookup(node.name)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,422
parent_of
ref
function
if not stmts or not assign_scope.parent_of(node_scope):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,425
is_comprehension
ref
function
if utils.is_comprehension(assign_scope):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,426
add_message
ref
function
self.add_message("cell-var-from-loop", node=node, args=node.name)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,440
parent_of
ref
function
and maybe_for.parent_of(node_scope)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,441
is_being_called
ref
function
and not utils.is_being_called(node_scope)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,443
statement
ref
function
and not isinstance(node_scope.statement(future=True), nodes.Return)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,445
add_message
ref
function
self.add_message("cell-var-from-loop", node=node, args=node.name)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,447
_should_ignore_redefined_builtin
def
function
def _should_ignore_redefined_builtin(self, stmt): if not isinstance(stmt, nodes.ImportFrom): return _False return stmt.modname in self.linter.config.redefining_builtins_modules def _allowed_redefined_builtin(self, name): return name in self.linter.config.allowed_redefined_bu...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,452
_allowed_redefined_builtin
def
function
def _allowed_redefined_builtin(self, name): return name in self.linter.config.allowed_redefined_builtins @staticmethod def _comprehension_between_frame_and_node(node: nodes.Name) -> bool: """Return _True if a ComprehensionScope intervenes between `node` and its frame.""" closest_com...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,456
_comprehension_between_frame_and_node
def
function
def _comprehension_between_frame_and_node(node: nodes.Name) -> bool: """Return _True if a ComprehensionScope intervenes between `node` and its frame.""" closest_comprehension_scope = utils.get_node_first_ancestor_of_type( node, nodes.ComprehensionScope ) return closest_co...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,458
get_node_first_ancestor_of_type
ref
function
closest_comprehension_scope = utils.get_node_first_ancestor_of_type(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,461
frame
ref
function
return closest_comprehension_scope is not None and node.frame(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,463
parent_of
ref
function
).parent_of(closest_comprehension_scope)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,465
_store_type_annotation_node
def
function
def _store_type_annotation_node(self, type_annotation): """Given a type annotation, store all the name nodes it refers to.""" if isinstance(type_annotation, nodes.Name): self._type_annotation_names.append(type_annotation.name) return if isinstance(type_annotation, no...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,472
_store_type_annotation_node
ref
function
self._store_type_annotation_node(type_annotation.expr)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,487
nodes_of_class
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,490
_store_type_annotation_names
def
function
def _store_type_annotation_names(self, node): type_annotation = node.type_annotation if not type_annotation: return self._store_type_annotation_node(node.type_annotation) def _check_self_cls_assign(self, node: nodes.Assign) -> None: """Check that self/cls don't get a...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,494
_store_type_annotation_node
ref
function
self._store_type_annotation_node(node.type_annotation)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,496
_check_self_cls_assign
def
function
def _check_self_cls_assign(self, node: nodes.Assign) -> None: """Check that self/cls don't get assigned.""" assign_names: set[str | None] = set() for target in node.targets: if isinstance(target, nodes.AssignName): assign_names.add(target.name) elif is...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,506
scope
ref
function
scope = node.scope()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,511
scope
ref
function
scope = node.scope().parent.scope()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,511
scope
ref
function
scope = node.scope().parent.scope()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,515
is_method
ref
function
and scope.is_method()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,516
decoratornames
ref
function
and "builtins.staticmethod" not in scope.decoratornames()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,519
argnames
ref
function
argument_names = scope.argnames()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,524
add_message
ref
function
self.add_message("self-cls-assignment", node=node, args=(self_cls_name,))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,526
_check_unpacking
def
function
def _check_unpacking(self, inferred, node, targets): """Check for unbalanced tuple unpacking and unpacking non sequences. """ if utils.is_inside_abstract_class(node): return if utils.is_comprehension(node): return if inferred is astroid.Uninfer...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,530
is_inside_abstract_class
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,532
is_comprehension
ref
function
if utils.is_comprehension(node):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,545
_nodes_to_unpack
ref
function
values = self._nodes_to_unpack(inferred)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,551
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,555
_get_unpacking_extra_info
ref
function
_get_unpacking_extra_info(node, inferred),
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,561
is_iterable
ref
function
elif not utils.is_iterable(inferred):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,562
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,565
_get_unpacking_extra_info
ref
function
args=(_get_unpacking_extra_info(node, inferred),),
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,569
_nodes_to_unpack
def
function
def _nodes_to_unpack(node: nodes.NodeNG) -> list[nodes.NodeNG] | None: """Return the list of values of the `Assign` node.""" if isinstance(node, (nodes.Tuple, nodes.List)): return node.itered() if isinstance(node, astroid.Instance) and any( ancestor.qname() == "typing...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,572
itered
ref
function
return node.itered()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,574
qname
ref
function
ancestor.qname() == "typing.NamedTuple" for ancestor in node.ancestors()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,574
ancestors
ref
function
ancestor.qname() == "typing.NamedTuple" for ancestor in node.ancestors()
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,579
_check_module_attrs
def
function
def _check_module_attrs(self, node, module, module_names): """Check that module_names (list of string) are accessible through the given module, if the latest access name corresponds to a module, return it. """ while module_names: name = module_names.pop(0) if ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,589
infer
ref
function
module = next(module.getattr(name)[0].infer())
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,595
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,603
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,611
_check_all
def
function
def _check_all(self, node: nodes.Module, not_consumed): assigned = next(node.igetattr("__all__")) if assigned is astroid.Uninferable: return if not assigned.pytype() in {"builtins.list", "builtins.tuple"}: line, col = assigned.tolineno, assigned.col_offset ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,612
igetattr
ref
function
assigned = next(node.igetattr("__all__"))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,615
pytype
ref
function
if not assigned.pytype() in {"builtins.list", "builtins.tuple"}:
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,617
add_message
ref
function
self.add_message("invalid-all-format", line=line, col_offset=col, node=node)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,621
infer
ref
function
elt_name = next(elt.infer())
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,632
add_message
ref
function
self.add_message("invalid-all-object", args=elt.as_string(), node=elt)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,632
as_string
ref
function
self.add_message("invalid-all-object", args=elt.as_string(), node=elt)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,643
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,647
splitext
ref
function
basename = os.path.splitext(node.file)[0]
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,648
basename
ref
function
if os.path.basename(basename) == "__init__":
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,651
file_from_modpath
ref
function
astroid.modutils.file_from_modpath(name.split("."))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,653
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,662
_check_globals
def
function
def _check_globals(self, not_consumed): if self._allow_global_unused_variables: return for name, node_lst in not_consumed.items(): for node in node_lst: self.add_message("unused-variable", args=(name,), node=node) def _check_imports(self, not_consumed): ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,667
add_message
ref
function
self.add_message("unused-variable", args=(name,), node=node)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,669
_check_imports
def
function
def _check_imports(self, not_consumed): local_names = _fix_dot_imports(not_consumed) checked = set() unused_wildcard_imports: defaultdict[ tuple[str, nodes.ImportFrom], list[str] ] = collections.defaultdict(list) for name, stmt in local_names: for impo...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,670
_fix_dot_imports
ref
function
local_names = _fix_dot_imports(not_consumed)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,711
in_type_checking_block
ref
function
if not in_type_checking_block(stmt):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,712
add_message
ref
function
self.add_message("unused-import", args=msg, node=stmt)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,719
_is_from_future_import
ref
function
if _is_from_future_import(stmt, name):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,735
in_type_checking_block
ref
function
if not in_type_checking_block(stmt):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,736
add_message
ref
function
self.add_message("unused-import", args=msg, node=stmt)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,746
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,751
_check_metaclasses
def
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,755
get_children
ref
function
for child_node in node.get_children():
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,757
_check_classdef_metaclasses
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,764
_check_classdef_metaclasses
def
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,770
metaclass
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,784
root
ref
class
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,808
is_builtin
ref
function
or utils.is_builtin(name)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,812
add_message
ref
function
self.add_message("undefined-variable", node=klass, args=(name,))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,816
visit_subscript
def
function
def visit_subscript(self, node: nodes.Subscript) -> None: inferred_slice = utils.safe_infer(node.slice) self._check_potential_index_error(node, inferred_slice) def _check_potential_index_error( self, node: nodes.Subscript, inferred_slice: nodes.NodeNG | None ) -> None: """C...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,817
safe_infer
ref
function
inferred_slice = utils.safe_infer(node.slice)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,819
_check_potential_index_error
ref
function
self._check_potential_index_error(node, inferred_slice)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,821
_check_potential_index_error
def
function
def _check_potential_index_error( self, node: nodes.Subscript, inferred_slice: nodes.NodeNG | None ) -> None: """Check for the potential-index-error message.""" # Currently we only check simple slices of a single integer if not isinstance(inferred_slice, nodes.Const) or not isins...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,835
add_message
ref
function
self.add_message(
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,841
register
def
function
def register(linter: PyLinter) -> None: linter.register_checker(VariablesChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,842
register_checker
ref
function
linter.register_checker(VariablesChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/checkers/variables.py
pylint/checkers/variables.py
2,842
VariablesChecker
ref
function
linter.register_checker(VariablesChecker(linter))
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/__init__.py
pylint/config/__init__.py
54
exists
ref
function
if os.path.exists(old_home) and not os.path.exists(spam_prevention_file):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/__init__.py
pylint/config/__init__.py
54
exists
ref
function
if os.path.exists(old_home) and not os.path.exists(spam_prevention_file):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/__init__.py
pylint/config/__init__.py
61
exists
ref
function
if os.path.exists(PYLINT_HOME):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/__init__.py
pylint/config/__init__.py
81
_get_pdata_path
def
function
def _get_pdata_path(base_name: str, recurs: int) -> pathlib.Path: base_name = base_name.replace(os.sep, "_") return pathlib.Path(PYLINT_HOME) / f"{base_name}{recurs}.stats"
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/__init__.py
pylint/config/__init__.py
86
load_results
def
function
def load_results(base: str) -> LinterStats | None: data_file = _get_pdata_path(base, 1) try: with open(data_file, "rb") as stream: data = pickle.load(stream) if not isinstance(data, LinterStats): raise TypeError return data except Exception: # pyl...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/__init__.py
pylint/config/__init__.py
87
_get_pdata_path
ref
function
data_file = _get_pdata_path(base, 1)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/__init__.py
pylint/config/__init__.py
98
save_results
def
function
def save_results(results: LinterStats, base: str) -> None: if not os.path.exists(PYLINT_HOME): try: os.makedirs(PYLINT_HOME) except OSError: print(f"Unable to create directory {PYLINT_HOME}", file=sys.stderr) data_file = _get_pdata_path(base, 1) try: with open...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/__init__.py
pylint/config/__init__.py
99
exists
ref
function
if not os.path.exists(PYLINT_HOME):
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/__init__.py
pylint/config/__init__.py
104
_get_pdata_path
ref
function
data_file = _get_pdata_path(base, 1)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/argument.py
pylint/config/argument.py
44
_confidence_transformer
def
function
def _confidence_transformer(value: str) -> Sequence[str]: """Transforms a comma separated string of confidence values.""" values = pylint_utils._check_csv(value) for confidence in values: if confidence not in interfaces.CONFIDENCE_LEVEL_NAMES: raise argparse.ArgumentTypeError( ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/argument.py
pylint/config/argument.py
46
_check_csv
ref
function
values = pylint_utils._check_csv(value)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/argument.py
pylint/config/argument.py
55
_csv_transformer
def
function
def _csv_transformer(value: str) -> Sequence[str]: """Transforms a comma separated string.""" return pylint_utils._check_csv(value)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/argument.py
pylint/config/argument.py
57
_check_csv
ref
function
return pylint_utils._check_csv(value)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/argument.py
pylint/config/argument.py
64
_yn_transformer
def
function
def _yn_transformer(value: str) -> bool: """Transforms a yes/no or stringified bool into a bool.""" value = value.lower() if value in YES_VALUES: return _True if value in NO_VALUES: return _False raise argparse.ArgumentTypeError( None, f"Invalid yn value '{value}', should be ...
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/argument.py
pylint/config/argument.py
76
_non_empty_string_transformer
def
function
def _non_empty_string_transformer(value: str) -> str: """Check that a string is not empty and remove quotes.""" if not value: raise argparse.ArgumentTypeError("Option cannot be an empty string.") return pylint_utils._unquote(value)
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/argument.py
pylint/config/argument.py
80
_unquote
ref
function
return pylint_utils._unquote(value)