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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,183 | issue_config_time_warning | ref | function | self.issue_config_time_warning(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,191 | pytest_load_initial_conftests | ref | function | self.hook.pytest_load_initial_conftests(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,198 | issue_config_time_warning | ref | function | self.issue_config_time_warning(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,199 | PytestConfigWarning | ref | function | PytestConfigWarning(f"could not load initial conftests: {e.path}"),
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,205 | hookimpl | ref | function | @hookimpl(hookwrapper=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,206 | pytest_collection | def | function | def pytest_collection(self) -> Generator[None, None, None]:
# Validate invalid ini keys after collection is done so we take in account
# options added by late-loading conftest files.
yield
self._validate_config_options()
def _checkversion(self) -> None:
import pytest
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,210 | _validate_config_options | ref | function | self._validate_config_options()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,212 | _checkversion | def | function | def _checkversion(self) -> None:
import pytest
minver = self.inicfg.get("minversion", None)
if minver:
# Imported lazily to improve start-up time.
from packaging.version import Version
if not isinstance(minver, str):
raise pytest.UsageErr... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,221 | UsageError | ref | function | raise pytest.UsageError(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,226 | UsageError | ref | function | raise pytest.UsageError(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,235 | _validate_config_options | def | function | def _validate_config_options(self) -> None:
for key in sorted(self._get_unknown_ini_keys()):
self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")
def _validate_plugins(self) -> None:
required_plugins = sorted(self.getini("required_plugins"))
if not required_plugin... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,236 | _get_unknown_ini_keys | ref | function | for key in sorted(self._get_unknown_ini_keys()):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,237 | _warn_or_fail_if_strict | ref | function | self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,239 | _validate_plugins | def | function | def _validate_plugins(self) -> None:
required_plugins = sorted(self.getini("required_plugins"))
if not required_plugins:
return
# Imported lazily to improve start-up time.
from packaging.version import Version
from packaging.requirements import InvalidRequirement... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,240 | getini | ref | function | required_plugins = sorted(self.getini("required_plugins"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,248 | list_plugin_distinfo | ref | function | plugin_info = self.pluginmanager.list_plugin_distinfo()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,261 | contains | ref | function | elif not req.specifier.contains(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,267 | UsageError | ref | function | raise UsageError(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,271 | _warn_or_fail_if_strict | def | function | def _warn_or_fail_if_strict(self, message: str) -> None:
if self.known_args_namespace.strict_config:
raise UsageError(message)
self.issue_config_time_warning(PytestConfigWarning(message), stacklevel=3)
def _get_unknown_ini_keys(self) -> List[str]:
parser_inicfg = self._pars... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,273 | UsageError | ref | function | raise UsageError(message)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,275 | issue_config_time_warning | ref | function | self.issue_config_time_warning(PytestConfigWarning(message), stacklevel=3)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,275 | PytestConfigWarning | ref | function | self.issue_config_time_warning(PytestConfigWarning(message), stacklevel=3)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,277 | _get_unknown_ini_keys | def | function | def _get_unknown_ini_keys(self) -> List[str]:
parser_inicfg = self._parser._inidict
return [name for name in self.inicfg if name not in parser_inicfg]
def parse(self, args: List[str], addopts: bool = _True) -> None:
# Parse given cmdline arguments into this config object.
assert... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,281 | parse | def | function | null |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,286 | call_historic | ref | function | self.hook.pytest_addhooks.call_historic(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,289 | _preparse | ref | function | self._preparse(args, addopts=addopts)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,291 | pytest_cmdline_preparse | ref | function | self.hook.pytest_cmdline_preparse(config=self, args=args)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,294 | parse_setoption | ref | function | args = self._parser.parse_setoption(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,299 | getini | ref | function | args = self.getini("testpaths")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,306 | issue_config_time_warning | def | function | def issue_config_time_warning(self, warning: Warning, stacklevel: int) -> None:
"""Issue and handle a warning during the "configure" stage.
During ``pytest_configure`` we can't capture warnings using the ``catch_warnings_for_item``
function because it is not possible to have hookwrappers ar... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,318 | is_blocked | ref | function | if self.pluginmanager.is_blocked("warnings"):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,322 | getini | ref | function | config_filters = self.getini("filterwarnings")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,326 | apply_warning_filters | ref | function | apply_warning_filters(config_filters, cmdline_filters)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,332 | call_historic | ref | function | self.hook.pytest_warning_captured.call_historic(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,340 | call_historic | ref | function | self.hook.pytest_warning_recorded.call_historic(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,349 | addinivalue_line | def | function | def addinivalue_line(self, name: str, line: str) -> None:
"""Add a line to an ini-file option. The option must have been
declared but might not yet be set in which case the line becomes
the first line in its value."""
x = self.getini(name)
assert isinstance(x, list)
x... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,353 | getini | ref | function | x = self.getini(name)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,357 | getini | def | function | def getini(self, name: str):
"""Return configuration value from an :ref:`ini file <configfiles>`.
If the specified name hasn't been registered through a prior
:func:`parser.addini <pytest.Parser.addini>` call (usually from a
plugin), a ValueError is raised.
"""
try:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,367 | _getini | ref | function | self._inicache[name] = val = self._getini(name)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,372 | _getini_unknown_type | def | function | def _getini_unknown_type(self, name: str, type: str, value: Union[str, List[str]]):
msg = f"unknown configuration type: {type}"
raise ValueError(msg, value) # pragma: no cover
def _getini(self, name: str):
try:
description, type, default = self._parser._inidict[name]
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,376 | _getini | def | function | def _getini(self, name: str):
try:
description, type, default = self._parser._inidict[name]
except KeyError as e:
raise ValueError(f"unknown configuration value: {name!r}") from e
override_value = self._get_override_ini_value(name)
if override_value is None:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,381 | _get_override_ini_value | ref | function | override_value = self._get_override_ini_value(name)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,422 | _strtobool | ref | function | return _strtobool(str(value).strip())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,428 | _getini_unknown_type | ref | function | return self._getini_unknown_type(name, type, value)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,430 | _getconftest_pathlist | def | function | def _getconftest_pathlist(
self, name: str, path: Path, rootpath: Path
) -> Optional[List[Path]]:
try:
mod, relroots = self.pluginmanager._rget_with_confmod(
name, path, self.getoption("importmode"), rootpath
)
except KeyError:
return N... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,434 | _rget_with_confmod | ref | function | mod, relroots = self.pluginmanager._rget_with_confmod(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,435 | getoption | ref | function | name, path, self.getoption("importmode"), rootpath
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,446 | absolutepath | ref | function | relroot = absolutepath(modpath / relroot)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,450 | _get_override_ini_value | def | function | def _get_override_ini_value(self, name: str) -> Optional[str]:
value = None
# override_ini is a list of "ini=value" options.
# Always use the last item if multiple values are set for same ini-name,
# e.g. -o foo=bar1 -o foo=bar2 will set foo to bar2.
for ini_config in self._o... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,459 | UsageError | ref | function | raise UsageError(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,469 | getoption | def | function | null |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,490 | skip | ref | function | pytest.skip(f"no {name!r} option found")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,493 | getvalue | def | function | def getvalue(self, name: str, path=None):
"""Deprecated, use getoption() instead."""
return self.getoption(name)
def getvalueorskip(self, name: str, path=None):
"""Deprecated, use getoption(skip=_True) instead."""
return self.getoption(name, skip=_True)
def _warn_about_miss... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,495 | getoption | ref | function | return self.getoption(name)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,497 | getvalueorskip | def | function | def getvalueorskip(self, name: str, path=None):
"""Deprecated, use getoption(skip=_True) instead."""
return self.getoption(name, skip=_True)
def _warn_about_missing_assertion(self, mode: str) -> None:
if not _assertion_supported():
if mode == "plain":
warning... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,499 | getoption | ref | function | return self.getoption(name, skip=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,501 | _warn_about_missing_assertion | def | function | def _warn_about_missing_assertion(self, mode: str) -> None:
if not _assertion_supported():
if mode == "plain":
warning_text = (
"ASSERTIONS ARE NOT EXECUTED"
" and FAILING TESTS WILL PASS. Are you"
" using python -O?"
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,502 | _assertion_supported | ref | function | if not _assertion_supported():
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,517 | issue_config_time_warning | ref | function | self.issue_config_time_warning(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,518 | PytestConfigWarning | ref | function | PytestConfigWarning(warning_text),
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,522 | _warn_about_skipped_plugins | def | function | def _warn_about_skipped_plugins(self) -> None:
for module_name, msg in self.pluginmanager.skipped_plugins:
self.issue_config_time_warning(
PytestConfigWarning(f"skipped plugin {module_name!r}: {msg}"),
stacklevel=2,
)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,524 | issue_config_time_warning | ref | function | self.issue_config_time_warning(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,525 | PytestConfigWarning | ref | function | PytestConfigWarning(f"skipped plugin {module_name!r}: {msg}"),
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,530 | _assertion_supported | def | function | def _assertion_supported() -> bool:
try:
assert _False
except AssertionError:
return _True
else:
return _False # type: ignore[unreachable]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,539 | create_terminal_writer | def | function | def create_terminal_writer(
config: Config, file: Optional[TextIO] = None
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,548 | TerminalWriter | ref | function | tw = TerminalWriter(file=file)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,563 | _strtobool | def | function | def _strtobool(val: str) -> bool:
"""Convert a string representation of truth to _True or _False.
_True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if
'val' is anything else.
.. note:: Copied from distutils.util.
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,582 | parse_warning_filter | def | function | def parse_warning_filter(
arg: str, *, escape: bool
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,620 | UsageError | ref | function | raise UsageError(error_template.format(error=error))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,628 | UsageError | ref | function | raise UsageError(error_template.format(error=str(e)))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,630 | _resolve_warning_category | ref | function | category: Type[Warning] = _resolve_warning_category(category_)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,632 | from_current | ref | function | exc_info = ExceptionInfo.from_current()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,633 | getrepr | ref | function | exception_text = exc_info.getrepr(style="native")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,634 | UsageError | ref | function | raise UsageError(error_template.format(error=exception_text))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,645 | UsageError | ref | function | raise UsageError(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,653 | _resolve_warning_category | def | function | def _resolve_warning_category(category: str) -> Type[Warning]:
"""
Copied from warnings._getcategory, but changed so it lets exceptions (specially ImportErrors)
propagate so we can get access to their tracebacks (#9218).
"""
__tracebackhide__ = _True
if not category:
return Warning
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,671 | UsageError | ref | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,675 | apply_warning_filters | def | function | def apply_warning_filters(
config_filters: Iterable[str], cmdline_filters: Iterable[str]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,682 | parse_warning_filter | ref | function | warnings.filterwarnings(*parse_warning_filter(arg, escape=False))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/__init__.py | src/_pytest/config/__init__.py | 1,685 | parse_warning_filter | ref | function | warnings.filterwarnings(*parse_warning_filter(arg, escape=True))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 33 | Parser | def | class | __init__ processoption getgroup addoption parse _getparser parse_setoption parse_known_args parse_known_and_unknown_args addini |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 49 | check_ispytest | ref | function | check_ispytest(_ispytest)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 50 | OptionGroup | ref | function | self._anonymous = OptionGroup("custom options", parser=self, _ispytest=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 58 | processoption | def | function | def processoption(self, option: "Argument") -> None:
if self._processopt:
if option.dest:
self._processopt(option)
def getgroup(
self, name: str, description: str = "", after: Optional[str] = None
) -> "OptionGroup":
"""Get (or create) a named option Grou... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 61 | _processopt | ref | function | self._processopt(option)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 63 | getgroup | def | function | def getgroup(
self, name: str, description: str = "", after: Optional[str] = None
) -> "OptionGroup":
"""Get (or create) a named option Group.
:name: Name of the option group.
:description: Long description for --help output.
:after: Name of another group, used for order... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 80 | OptionGroup | ref | function | group = OptionGroup(name, description, parser=self, _ispytest=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 88 | addoption | def | function | def addoption(self, *opts: str, **attrs: Any) -> None:
"""Register a command line option.
:opts: Option names, can be short or long options.
:attrs: Same attributes which the ``add_argument()`` function of the
`argparse library <https://docs.python.org/library/argparse.html>`_
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 101 | addoption | ref | function | self._anonymous.addoption(*opts, **attrs)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 103 | parse | def | function | def parse(
self,
args: Sequence[Union[str, "os.PathLike[str]"]],
namespace: Optional[argparse.Namespace] = None,
) -> argparse.Namespace:
from _pytest._argcomplete import try_argcomplete
self.optparser = self._getparser()
try_argcomplete(self.optparser)
s... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 110 | _getparser | ref | function | self.optparser = self._getparser()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 111 | try_argcomplete | ref | function | try_argcomplete(self.optparser)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 113 | parse_args | ref | function | return self.optparser.parse_args(strargs, namespace=namespace)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 115 | _getparser | def | function | def _getparser(self) -> "MyOptionParser":
from _pytest._argcomplete import filescompleter
optparser = MyOptionParser(self, self.extra_info, prog=self.prog)
groups = self._groups + [self._anonymous]
for group in groups:
if group.options:
desc = group.descr... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 118 | MyOptionParser | ref | function | optparser = MyOptionParser(self, self.extra_info, prog=self.prog)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 123 | add_argument_group | ref | function | arggroup = optparser.add_argument_group(desc)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 125 | names | ref | function | n = option.names()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 126 | attrs | ref | function | a = option.attrs()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 127 | add_argument | ref | function | arggroup.add_argument(*n, **a)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 128 | add_argument | ref | function | file_or_dir_arg = optparser.add_argument(FILE_OR_DIR, nargs="*")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.