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/argparsing.py | src/_pytest/config/argparsing.py | 134 | parse_setoption | def | function | def parse_setoption(
self,
args: Sequence[Union[str, "os.PathLike[str]"]],
option: argparse.Namespace,
namespace: Optional[argparse.Namespace] = None,
) -> List[str]:
parsedoption = self.parse(args, namespace=namespace)
for name, value in parsedoption.__dict__.ite... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 140 | parse | ref | function | parsedoption = self.parse(args, namespace=namespace)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 145 | parse_known_args | def | function | def parse_known_args(
self,
args: Sequence[Union[str, "os.PathLike[str]"]],
namespace: Optional[argparse.Namespace] = None,
) -> argparse.Namespace:
"""Parse and return a namespace object with known arguments at this point."""
return self.parse_known_and_unknown_args(args... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 151 | parse_known_and_unknown_args | ref | function | return self.parse_known_and_unknown_args(args, namespace=namespace)[0]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 153 | parse_known_and_unknown_args | def | function | def parse_known_and_unknown_args(
self,
args: Sequence[Union[str, "os.PathLike[str]"]],
namespace: Optional[argparse.Namespace] = None,
) -> Tuple[argparse.Namespace, List[str]]:
"""Parse and return a namespace object with known arguments, and
the remaining arguments unkn... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 160 | _getparser | ref | function | optparser = self._getparser()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 162 | parse_known_args | ref | function | return optparser.parse_known_args(strargs, namespace=namespace)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 164 | addini | def | function | def addini(
self,
name: str,
help: str,
type: Optional[
"Literal['string', 'paths', 'pathlist', 'args', 'linelist', 'bool']"
] = None,
default=None,
) -> None:
"""Register an ini-file option.
:name:
Name of the ini-variable... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 217 | Argument | def | class | __init__ names attrs _set_opt_strings __repr__ |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 264 | _set_opt_strings | ref | function | self._set_opt_strings(names)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 277 | names | def | function | def names(self) -> List[str]:
return self._short_opts + self._long_opts
def attrs(self) -> Mapping[str, Any]:
# Update any attributes set by processopt.
attrs = "default dest help".split()
attrs.append(self.dest)
for attr in attrs:
try:
self._... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 280 | attrs | def | function | def attrs(self) -> Mapping[str, Any]:
# Update any attributes set by processopt.
attrs = "default dest help".split()
attrs.append(self.dest)
for attr in attrs:
try:
self._attrs[attr] = getattr(self, attr)
except AttributeError:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 296 | _set_opt_strings | def | function | def _set_opt_strings(self, opts: Sequence[str]) -> None:
"""Directly from optparse.
Might not be necessary as this is passed to argparse later on.
"""
for opt in opts:
if len(opt) < 2:
raise ArgumentError(
"invalid option string %r: "
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 339 | OptionGroup | def | class | __init__ addoption _addoption _addoption_instance |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 350 | check_ispytest | ref | function | check_ispytest(_ispytest)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 356 | addoption | def | function | def addoption(self, *optnames: str, **attrs: Any) -> None:
"""Add an option to this group.
If a shortened version of a long option is specified, it will
be suppressed in the help. ``addoption('--twowords', '--two-words')``
results in help showing ``--two-words`` only, but ``--twowor... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 365 | names | ref | function | name for opt in self.options for name in opt.names()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 369 | Argument | ref | function | option = Argument(*optnames, **attrs)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 370 | _addoption_instance | ref | function | self._addoption_instance(option, shortupper=False)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 372 | _addoption | def | function | def _addoption(self, *optnames: str, **attrs: Any) -> None:
option = Argument(*optnames, **attrs)
self._addoption_instance(option, shortupper=_True)
def _addoption_instance(self, option: "Argument", shortupper: bool = _False) -> None:
if not shortupper:
for opt in option._sh... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 373 | Argument | ref | function | option = Argument(*optnames, **attrs)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 374 | _addoption_instance | ref | function | self._addoption_instance(option, shortupper=True)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 376 | _addoption_instance | def | function | null |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 382 | processoption | ref | function | self.parser.processoption(option)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 386 | MyOptionParser | def | class | __init__ error parse_args |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 413 | UsageError | ref | function | raise UsageError(self.format_usage() + msg)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 413 | format_usage | ref | function | raise UsageError(self.format_usage() + msg)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 416 | parse_args | def | function | def parse_args( # type: ignore
self,
args: Optional[Sequence[str]] = None,
namespace: Optional[argparse.Namespace] = None,
) -> argparse.Namespace:
"""Allow splitting of positional arguments."""
parsed, unrecognized = self.parse_known_args(args, namespace)
if unr... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 422 | parse_known_args | ref | function | parsed, unrecognized = self.parse_known_args(args, namespace)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 436 | _parse_optional | def | function | def _parse_optional(
self, arg_string: str
) -> Optional[Tuple[Optional[argparse.Action], str, Optional[str]]]:
if not arg_string:
return None
if not arg_string[0] in self.prefix_chars:
return None
if arg_string in self._opt... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 454 | _get_option_tuples | ref | function | option_tuples = self._get_option_tuples(arg_string)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 464 | match | ref | function | if self._negative_number_matcher.match(arg_string):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 472 | DropShorterLongHelpFormatter | def | class | __init__ _format_action_invocation _split_lines |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 483 | get_terminal_width | ref | function | kwargs["width"] = _pytest._io.get_terminal_width()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 486 | _format_action_invocation | def | function | def _format_action_invocation(self, action: argparse.Action) -> str:
orgstr = super()._format_action_invocation(action)
if orgstr and orgstr[0] != "-": # only optional arguments
return orgstr
res: Optional[str] = getattr(action, "_formatted_action_invocation", None)
if r... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 487 | _format_action_invocation | ref | function | orgstr = super()._format_action_invocation(action)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/argparsing.py | src/_pytest/config/argparsing.py | 524 | _split_lines | def | function | def _split_lines(self, text, width):
"""Wrap lines after splitting on original newlines.
This allows to have explicit line breaks in the help text.
"""
import textwrap
lines = []
for line in text.splitlines():
lines.extend(textwrap.wrap(line.strip(), wid... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/compat.py | src/_pytest/config/compat.py | 20 | PathAwareHookProxy | def | class | __init__ __dir__ __getattr__ |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/compat.py | src/_pytest/config/compat.py | 35 | __getattr__ | def | function | def __getattr__(self, key, _wraps=functools.wraps):
hook = getattr(self.__hook_caller, key)
if key not in imply_paths_hooks:
self.__dict__[key] = hook
return hook
else:
path_var, fspath_var = imply_paths_hooks[key]
@_wraps(hook)
de... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/compat.py | src/_pytest/config/compat.py | 43 | _wraps | ref | function | @_wraps(hook)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/compat.py | src/_pytest/config/compat.py | 44 | fixed_hook | def | function | def fixed_hook(**kw):
path_value: Optional[Path] = kw.pop(path_var, None)
fspath_value: Optional[LEGACY_PATH] = kw.pop(fspath_var, None)
if fspath_value is not None:
warnings.warn(
HOOK_LEGACY_PATH_ARG.format(
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/compat.py | src/_pytest/config/compat.py | 57 | _check_path | ref | function | _check_path(path_value, fspath_value)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/compat.py | src/_pytest/config/compat.py | 59 | legacy_path | ref | function | fspath_value = legacy_path(path_value)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/compat.py | src/_pytest/config/compat.py | 66 | hook | ref | function | return hook(**kw)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/exceptions.py | src/_pytest/config/exceptions.py | 4 | UsageError | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/exceptions.py | src/_pytest/config/exceptions.py | 8 | PrintHelp | def | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/exceptions.py | src/_pytest/config/exceptions.py | -1 | _pytest | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/exceptions.py | src/_pytest/config/exceptions.py | -1 | . | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/exceptions.py | src/_pytest/config/exceptions.py | -1 | compat | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/exceptions.py | src/_pytest/config/exceptions.py | -1 | final | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/exceptions.py | src/_pytest/config/exceptions.py | -1 | @final | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/exceptions.py | src/_pytest/config/exceptions.py | -1 | UsageError | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/exceptions.py | src/_pytest/config/exceptions.py | -1 | Exception | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/exceptions.py | src/_pytest/config/exceptions.py | -1 | PrintHelp | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/exceptions.py | src/_pytest/config/exceptions.py | -1 | Exception | ref | function | none |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 22 | _parse_ini_config | def | function | def _parse_ini_config(path: Path) -> iniconfig.IniConfig:
"""Parse the given generic '.ini' file using legacy IniConfig parser, returning
the parsed object.
Raise UsageError if the file cannot be parsed.
"""
try:
return iniconfig.IniConfig(str(path))
except iniconfig.ParseError as exc:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 29 | IniConfig | ref | function | return iniconfig.IniConfig(str(path))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 31 | UsageError | ref | function | raise UsageError(str(exc)) from exc
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 34 | load_config_dict_from_file | def | function | def load_config_dict_from_file(
filepath: Path,
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 44 | _parse_ini_config | ref | function | iniconfig = _parse_ini_config(filepath)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 55 | _parse_ini_config | ref | function | iniconfig = _parse_ini_config(filepath)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 62 | fail | ref | function | fail(CFG_PYTEST_SECTION.format(filename="setup.cfg"), pytrace=False)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 70 | loads | ref | function | config = tomli.loads(toml_text)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 72 | UsageError | ref | function | raise UsageError(str(exc)) from exc
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 79 | make_scalar | def | function | def make_scalar(v: object) -> Union[str, List[str]]:
return v if isinstance(v, list) else str(v)
return {k: make_scalar(v) for k, v in result.items()}
return None
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 82 | make_scalar | ref | function | return {k: make_scalar(v) for k, v in result.items()}
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 87 | locate_config | def | function | def locate_config(
args: Iterable[Path],
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 102 | absolutepath | ref | function | argpath = absolutepath(arg)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 107 | load_config_dict_from_file | ref | function | ini_config = load_config_dict_from_file(p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 113 | get_common_ancestor | def | function | def get_common_ancestor(paths: Iterable[Path]) -> Path:
common_ancestor: Optional[Path] = None
for path in paths:
if not path.exists():
continue
if common_ancestor is None:
common_ancestor = path
else:
if common_ancestor in path.parents or path == comm... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 126 | commonpath | ref | function | shared = commonpath(path, common_ancestor)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 136 | get_dirs_from_args | def | function | def get_dirs_from_args(args: Iterable[str]) -> List[Path]:
def is_option(x: str) -> bool:
return x.startswith("-")
def get_file_part_from_node_id(x: str) -> str:
return x.split("::")[0]
def get_dir_from_path(path: Path) -> Path:
if path.is_dir():
return path
ret... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 137 | is_option | def | function | def is_option(x: str) -> bool:
return x.startswith("-")
def get_file_part_from_node_id(x: str) -> str:
return x.split("::")[0]
def get_dir_from_path(path: Path) -> Path:
if path.is_dir():
return path
return path.parent
def safe_exists(path: Path) -> bool:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 140 | get_file_part_from_node_id | def | function | def get_file_part_from_node_id(x: str) -> str:
return x.split("::")[0]
def get_dir_from_path(path: Path) -> Path:
if path.is_dir():
return path
return path.parent
def safe_exists(path: Path) -> bool:
# This can throw on paths that contain characters unrepresenta... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 143 | get_dir_from_path | def | function | def get_dir_from_path(path: Path) -> Path:
if path.is_dir():
return path
return path.parent
def safe_exists(path: Path) -> bool:
# This can throw on paths that contain characters unrepresentable at the OS level,
# or with invalid syntax on Windows (https://bugs.pytho... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 148 | safe_exists | def | function | def safe_exists(path: Path) -> bool:
# This can throw on paths that contain characters unrepresentable at the OS level,
# or with invalid syntax on Windows (https://bugs.python.org/issue35306)
try:
return path.exists()
except OSError:
return _False
# Thes... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 158 | absolutepath | ref | function | absolutepath(get_file_part_from_node_id(arg))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 158 | get_file_part_from_node_id | ref | function | absolutepath(get_file_part_from_node_id(arg))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 160 | is_option | ref | function | if not is_option(arg)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 163 | get_dir_from_path | ref | function | return [get_dir_from_path(path) for path in possible_paths if safe_exists(path)]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 163 | safe_exists | ref | function | return [get_dir_from_path(path) for path in possible_paths if safe_exists(path)]
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 169 | determine_setup | def | function | def determine_setup(
inifile: Optional[str],
args: Sequence[str],
rootdir_cmd_arg: Optional[str] = None,
config: Optional["Config"] = None,
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 176 | get_dirs_from_args | ref | function | dirs = get_dirs_from_args(args)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 178 | absolutepath | ref | function | inipath_ = absolutepath(inifile)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 180 | load_config_dict_from_file | ref | function | inicfg = load_config_dict_from_file(inipath_) or {}
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 184 | get_common_ancestor | ref | function | ancestor = get_common_ancestor(dirs)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 185 | locate_config | ref | function | rootdir, inipath, inicfg = locate_config([ancestor])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 193 | locate_config | ref | function | rootdir, inipath, inicfg = locate_config(dirs)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 199 | get_common_ancestor | ref | function | rootdir = get_common_ancestor([cwd, ancestor])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 200 | splitdrive | ref | function | is_fs_root = os.path.splitdrive(str(rootdir))[1] == "/"
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 204 | absolutepath | ref | function | rootdir = absolutepath(os.path.expandvars(rootdir_cmd_arg))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 204 | expandvars | ref | function | rootdir = absolutepath(os.path.expandvars(rootdir_cmd_arg))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/config/findpaths.py | src/_pytest/config/findpaths.py | 206 | UsageError | ref | function | raise UsageError(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/debugging.py | src/_pytest/debugging.py | 31 | _validate_usepdb_cls | def | function | def _validate_usepdb_cls(value: str) -> Tuple[str, str]:
"""Validate syntax of --pdbcls option."""
try:
modname, classname = value.split(":")
except ValueError as e:
raise argparse.ArgumentTypeError(
f"{value!r} is not in the format 'modname:classname'"
) from e
retur... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/debugging.py | src/_pytest/debugging.py | 42 | pytest_addoption | def | function | def pytest_addoption(parser: Parser) -> None:
group = parser.getgroup("general")
group._addoption(
"--pdb",
dest="usepdb",
action="store_true",
help="start the interactive Python debugger on errors or KeyboardInterrupt.",
)
group._addoption(
"--pdbcls",
de... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/debugging.py | src/_pytest/debugging.py | 43 | getgroup | ref | function | group = parser.getgroup("general")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/debugging.py | src/_pytest/debugging.py | 44 | _addoption | ref | function | group._addoption(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/debugging.py | src/_pytest/debugging.py | 50 | _addoption | ref | function | group._addoption(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/debugging.py | src/_pytest/debugging.py | 58 | _addoption | ref | function | group._addoption(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/debugging.py | src/_pytest/debugging.py | 66 | pytest_configure | def | function | def pytest_configure(config: Config) -> None:
import pdb
if config.getvalue("trace"):
config.pluginmanager.register(PdbTrace(), "pdbtrace")
if config.getvalue("usepdb"):
config.pluginmanager.register(PdbInvoke(), "pdbinvoke")
pytestPDB._saved.append(
(pdb.set_trace, pytestPDB._... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.