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/config/find_default_config_files.py | pylint/config/find_default_config_files.py | 78 | find_pylintrc | def | function | def find_pylintrc() -> str | None:
"""Search the pylint rc file and return its path if it finds it, else return None."""
# TODO: 3.0: Remove deprecated function
warnings.warn(
"find_pylintrc and the PYLINTRC constant have been deprecated. "
"Use find_default_config_files if you want access t... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/find_default_config_files.py | pylint/config/find_default_config_files.py | 87 | find_default_config_files | ref | function | for config_file in find_default_config_files():
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/help_formatter.py | pylint/config/help_formatter.py | 12 | _HelpFormatter | def | class | _get_help_string get_long_description |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/help_formatter.py | pylint/config/help_formatter.py | 15 | _get_help_string | def | function | def _get_help_string(self, action: argparse.Action) -> str | None:
"""Copied from argparse.ArgumentDefaultsHelpFormatter."""
assert action.help
help_string = action.help
# CallbackActions don't have a default
if isinstance(action, _CallbackAction):
return help_st... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/help_formatter.py | pylint/config/help_formatter.py | 32 | get_long_description | def | function | def get_long_description() -> str:
return f"""
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 17 | _csv_validator | def | function | def _csv_validator(_, name, value):
return utils._check_csv(value)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 18 | _check_csv | ref | function | return utils._check_csv(value)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 22 | _regexp_validator | def | function | def _regexp_validator(_, name, value):
if hasattr(value, "pattern"):
return value
return re.compile(value)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 29 | _regexp_csv_validator | def | function | def _regexp_csv_validator(_, name, value):
return [_regexp_validator(_, name, val) for val in _csv_validator(_, name, value)]
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 30 | _regexp_validator | ref | function | return [_regexp_validator(_, name, val) for val in _csv_validator(_, name, value)]
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 30 | _csv_validator | ref | function | return [_regexp_validator(_, name, val) for val in _csv_validator(_, name, value)]
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 33 | _regexp_paths_csv_validator | def | function | def _regexp_paths_csv_validator(
_, name: str, value: str | list[Pattern[str]]
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 39 | _csv_validator | ref | function | for val in _csv_validator(_, name, value):
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 44 | as_posix | ref | function | + pathlib.PureWindowsPath(val).as_posix()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 50 | _choice_validator | def | function | def _choice_validator(choices, name, value):
if value not in choices:
msg = "option %s: invalid value: %r, should be in %s"
raise optparse.OptionValueError(msg % (name, value, choices))
return value
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 57 | _yn_validator | def | function | def _yn_validator(opt, _, value):
if isinstance(value, int):
return bool(value)
if isinstance(value, str):
value = value.lower()
if value in {"y", "yes", "true"}:
return _True
if value in {"n", "no", "false"}:
return _False
msg = "option %s: invalid yn value %r, shoul... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 70 | _multiple_choice_validator | def | function | def _multiple_choice_validator(choices, name, value):
values = utils._check_csv(value)
for csv_value in values:
if csv_value not in choices:
msg = "option %s: invalid value: %r, should be in %s"
raise optparse.OptionValueError(msg % (name, csv_value, choices))
return values
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 71 | _check_csv | ref | function | values = utils._check_csv(value)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 79 | _non_empty_string_validator | def | function | def _non_empty_string_validator(opt, _, value): # pragma: no cover # Unused
if not value:
msg = "indent string can't be empty."
raise optparse.OptionValueError(msg)
return utils._unquote(value)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 83 | _unquote | ref | function | return utils._unquote(value)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 86 | _multiple_choices_validating_option | def | function | def _multiple_choices_validating_option(opt, name, value): # pragma: no cover # Unused
return _multiple_choice_validator(opt.choices, name, value)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 87 | _multiple_choice_validator | ref | function | return _multiple_choice_validator(opt.choices, name, value)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 90 | _py_version_validator | def | function | def _py_version_validator(_, name, value):
if not isinstance(value, tuple):
try:
value = tuple(int(val) for val in value.split("."))
except (ValueError, AttributeError):
raise optparse.OptionValueError(
f"Invalid format for {name}, should be version string. E.... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 110 | _choice_validator | ref | function | "choice": lambda opt, name, value: _choice_validator(opt["choices"], name, value),
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 111 | _multiple_choice_validator | ref | function | "confidence": lambda opt, name, value: _multiple_choice_validator(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 114 | _multiple_choice_validator | ref | function | "multiple_choice": lambda opt, name, value: _multiple_choice_validator(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 122 | _call_validator | def | function | def _call_validator(opttype, optdict, option, value):
if opttype not in VALIDATORS:
raise Exception(f'Unsupported type "{opttype}"')
try:
return VALIDATORS[opttype](optdict, option, value)
except TypeError:
try:
return VALIDATORS[opttype](value)
except Exception a... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 136 | _validate | def | function | def _validate(value, optdict, name=""):
"""Return a validated value for an option according to its type.
optional argument name is only used for error message formatting
"""
try:
_type = optdict["type"]
except KeyError:
return value
return _call_validator(_type, optdict, name, v... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 145 | _call_validator | ref | function | return _call_validator(_type, optdict, name, value)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 183 | _check_choice | def | function | def _check_choice(self):
if self.type in {"choice", "multiple_choice", "confidence"}:
if self.choices is None:
raise optparse.OptionError(
"must supply a list of choices for type 'choice'", self
)
if not isinstance(self.choices, (tu... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 203 | process | def | function | def process(self, opt, value, values, parser): # pragma: no cover # Argparse
if self.callback and self.callback.__module__ == "pylint.lint.run":
return 1
# First, convert the value(s) to the right type. Howl if any
# value(s) are bogus.
value = self.convert_value(opt, v... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 208 | convert_value | ref | function | value = self.convert_value(opt, value)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option.py | pylint/config/option.py | 217 | take_action | ref | function | return self.take_action(self.action, self.dest, opt, value, values, parser)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 28 | _expand_default | def | function | def _expand_default(self, option):
"""Patch OptionParser.expand_default with custom behaviour.
This will handle defaults to avoid overriding values in the
configuration file.
"""
if self.parser is None or not self.default_tag:
return option.help
optname = option._long_opts[0][2:]
tr... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 42 | get_option_def | ref | function | optdict = provider.get_option_def(optname)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 43 | option_attrname | ref | function | optname = provider.option_attrname(optname, optdict)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 45 | _format_option_value | ref | function | value = utils._format_option_value(optdict, value)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 52 | _patch_optparse | def | function | def _patch_optparse():
# pylint: disable = redefined-variable-type
orig_default = optparse.HelpFormatter
try:
optparse.HelpFormatter.expand_default = _expand_default
yield
finally:
optparse.HelpFormatter.expand_default = orig_default
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 62 | OptionsManagerMixIn | def | class | __init__ reset_parsers register_options_provider add_option_group add_optik_option optik_option cb_set_provider_option global_set_option generate_config load_provider_defaults read_config_file _parse_toml load_config_file load_configuration load_configuration_from_config load_command_line_configuration help |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 71 | reset_parsers | ref | function | self.reset_parsers(usage)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 82 | reset_parsers | def | function | def reset_parsers(self, usage=""):
# configuration file parser
self.cfgfile_parser = configparser.ConfigParser(
inline_comment_prefixes=("#", ";")
)
# command line parser
self.cmdline_parser = OptionParser(Option, usage=usage)
self.cmdline_parser.options_m... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 92 | register_options_provider | def | function | null |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 100 | add_option_group | ref | function | self.add_option_group(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 108 | add_optik_option | ref | function | self.add_optik_option(provider, self.cmdline_parser, opt, optdict)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 116 | add_option_group | ref | function | self.add_option_group(gname, gdoc, goptions, provider)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 118 | add_option_group | def | function | def add_option_group(self, group_name, _, options, provider):
# add option group to the command line parser
if group_name in self._mygroups:
group = self._mygroups[group_name]
else:
group = optparse.OptionGroup(
self.cmdline_parser, title=group_name.ca... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 126 | add_option_group | ref | function | self.cmdline_parser.add_option_group(group)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 133 | add_section | ref | function | self.cfgfile_parser.add_section(group_name)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 138 | add_optik_option | ref | function | self.add_optik_option(provider, group, opt, optdict)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 140 | add_optik_option | def | function | def add_optik_option(self, provider, optikcontainer, opt, optdict):
args, optdict = self.optik_option(provider, opt, optdict)
option = optikcontainer.add_option(*args, **optdict)
self._all_options[opt] = provider
self._maxlevel = max(self._maxlevel, option.level or 0)
def optik_... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 141 | optik_option | ref | function | args, optdict = self.optik_option(provider, opt, optdict)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 142 | add_option | ref | function | option = optikcontainer.add_option(*args, **optdict)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 146 | optik_option | def | function | def optik_option(self, provider, opt, optdict):
"""Get our personal option definition and return a suitable form for
use with optik/optparse.
"""
optdict = copy.copy(optdict)
if "action" in optdict:
self._nocallback_options[provider] = opt
else:
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 177 | cb_set_provider_option | def | function | def cb_set_provider_option(self, option, opt, value, parser):
"""Optik callback for option setting."""
if opt.startswith("--"):
# remove -- on long option
opt = opt[2:]
else:
# short option, get its long equivalent
opt = self._short_options[opt... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 188 | global_set_option | ref | function | self.global_set_option(opt, value)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 190 | global_set_option | def | function | def global_set_option(self, opt, value):
"""Set option on the correct option provider."""
self._all_options[opt].set_option(opt, value)
def generate_config(
self, stream: TextIO | None = None, skipsections: tuple[str, ...] = ()
) -> None:
"""Write a configuration file accord... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 192 | set_option | ref | function | self._all_options[opt].set_option(opt, value)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 194 | generate_config | def | function | def generate_config(
self, stream: TextIO | None = None, skipsections: tuple[str, ...] = ()
) -> None:
"""Write a configuration file according to the current configuration
into the given stream or stdout.
"""
options_by_section: dict[str, list[tuple[str, OptionDict, Any]]... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 203 | options_by_section | ref | function | for section, options in provider.options_by_section():
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 224 | format_section | ref | function | utils.format_section(
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 229 | load_provider_defaults | def | function | def load_provider_defaults(self):
"""Initialize configuration using default values."""
for provider in self.options_providers:
provider.load_defaults()
def read_config_file(
self, config_file: Path | None = None, verbose: bool = _False
) -> None:
"""Read the conf... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 232 | load_defaults | ref | function | provider.load_defaults()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 234 | read_config_file | def | function | def read_config_file(
self, config_file: Path | None = None, verbose: bool = _False
) -> None:
"""Read the configuration file but do not load it (i.e. dispatching
values to each option's provider).
"""
if config_file:
config_file = Path(os.path.expandvars(conf... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 241 | expandvars | ref | function | config_file = Path(os.path.expandvars(config_file)).expanduser()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 248 | _parse_toml | ref | function | self._parse_toml(config_file, parser)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 254 | read_file | ref | function | parser.read_file(fp)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 270 | _parse_toml | def | function | def _parse_toml(self, config_file: Path, parser: configparser.ConfigParser) -> None:
"""Parse and handle errors of a toml configuration file."""
with open(config_file, mode="rb") as fp:
content = tomllib.load(fp)
try:
sections_values = content["tool"]["pylint"]
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 273 | load | ref | function | content = tomllib.load(fp)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 284 | add_message | ref | function | self.add_message( # type: ignore[attr-defined]
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 299 | add_section | ref | function | parser.add_section(section_name)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 302 | load_config_file | def | function | def load_config_file(self):
"""Dispatch values previously read from a configuration file to each
option's provider.
"""
parser = self.cfgfile_parser
for section in parser.sections():
for option, value in parser.items(section):
try:
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 307 | sections | ref | function | for section in parser.sections():
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 310 | global_set_option | ref | function | self.global_set_option(option, value)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 314 | load_configuration | def | function | def load_configuration(self, **kwargs):
"""Override configuration according to given parameters."""
return self.load_configuration_from_config(kwargs)
def load_configuration_from_config(self, config):
for opt, opt_value in config.items():
opt = opt.replace("_", "-")
... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 316 | load_configuration_from_config | ref | function | return self.load_configuration_from_config(kwargs)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 318 | load_configuration_from_config | def | function | def load_configuration_from_config(self, config):
for opt, opt_value in config.items():
opt = opt.replace("_", "-")
provider = self._all_options[opt]
provider.set_option(opt, opt_value)
def load_command_line_configuration(self, args=None) -> list[str]:
"""Ove... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 322 | set_option | ref | function | provider.set_option(opt, opt_value)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 324 | load_command_line_configuration | def | function | def load_command_line_configuration(self, args=None) -> list[str]:
"""Override configuration according to command line parameters.
return additional arguments
"""
with _patch_optparse():
args = sys.argv[1:] if args is None else list(args)
(options, args) = se... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 329 | _patch_optparse | ref | function | with _patch_optparse():
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 331 | parse_args | ref | function | (options, args) = self.cmdline_parser.parse_args(args=args)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 344 | _patch_optparse | ref | function | with _patch_optparse():
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_manager_mixin.py | pylint/config/option_manager_mixin.py | 345 | format_help | ref | function | return self.cmdline_parser.format_help()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_parser.py | pylint/config/option_parser.py | 10 | _level_options | def | function | def _level_options(group, outputlevel):
return [
option
for option in group.option_list
if (getattr(option, "level", 0) or 0) <= outputlevel
and option.help is not optparse.SUPPRESS_HELP
]
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_parser.py | pylint/config/option_parser.py | 28 | format_option_help | def | function | def format_option_help(self, formatter=None):
if formatter is None:
formatter = self.formatter
outputlevel = getattr(formatter, "output_level", 0)
formatter.store_option_strings(self)
result = [formatter.format_heading("Options")]
formatter.indent()
if sel... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_parser.py | pylint/config/option_parser.py | 32 | store_option_strings | ref | function | formatter.store_option_strings(self)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_parser.py | pylint/config/option_parser.py | 33 | format_heading | ref | function | result = [formatter.format_heading("Options")]
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_parser.py | pylint/config/option_parser.py | 34 | indent | ref | function | formatter.indent()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_parser.py | pylint/config/option_parser.py | 36 | format_option_help | ref | function | result.append(optparse.OptionContainer.format_option_help(self, formatter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_parser.py | pylint/config/option_parser.py | 40 | _level_options | ref | function | group.description or _level_options(group, outputlevel)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_parser.py | pylint/config/option_parser.py | 42 | format_help | ref | function | result.append(group.format_help(formatter))
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_parser.py | pylint/config/option_parser.py | 44 | dedent | ref | function | formatter.dedent()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/option_parser.py | pylint/config/option_parser.py | 48 | _match_long_opt | def | function | def _match_long_opt(self, opt): # pragma: no cover # Unused
"""Disable abbreviations."""
if opt not in self._long_opt:
raise optparse.BadOptionError(opt)
return opt
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/options_provider_mixin.py | pylint/config/options_provider_mixin.py | 12 | UnsupportedAction | def | class | |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/options_provider_mixin.py | pylint/config/options_provider_mixin.py | 16 | OptionsProviderMixIn | def | class | __init__ load_defaults option_attrname option_value set_option get_option_def options_by_section options_and_values |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/options_provider_mixin.py | pylint/config/options_provider_mixin.py | 31 | load_defaults | ref | function | self.load_defaults()
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/options_provider_mixin.py | pylint/config/options_provider_mixin.py | 33 | load_defaults | def | function | def load_defaults(self):
"""Initialize the provider using default values."""
for opt, optdict in self.options:
action = optdict.get("action")
if action != "callback":
# callback action have no default
if optdict is None:
opt... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/options_provider_mixin.py | pylint/config/options_provider_mixin.py | 40 | get_option_def | ref | function | optdict = self.get_option_def(opt)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/options_provider_mixin.py | pylint/config/options_provider_mixin.py | 42 | set_option | ref | function | self.set_option(opt, default, action, optdict)
|
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/options_provider_mixin.py | pylint/config/options_provider_mixin.py | 44 | option_attrname | def | function | def option_attrname(self, opt, optdict=None):
"""Get the config attribute corresponding to opt."""
if optdict is None:
optdict = self.get_option_def(opt)
return optdict.get("dest", opt.replace("-", "_"))
def option_value(self, opt):
"""Get the current value for the g... |
playground/2af25c45-9624-42e9-b1b3-5ecb19e13cc8/pylint/pylint/config/options_provider_mixin.py | pylint/config/options_provider_mixin.py | 47 | get_option_def | ref | function | optdict = self.get_option_def(opt)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.