Method: pylint.config.find_default_config_files._find_project_config
Calls: 26, Exceptions: 5, Paths: 3Back
Path 1: 20 calls (0.77)
PermissionError (1)
1def _find_project_config() -> Iterator[Path]:
2 """Traverse up the directory tree to find a config file.
3
4 Stop if no '__init__' is found and thus we are no longer in a package.
5 """
6 if Path("__init__.py").is_file():
7 curdir = Path(os.getcwd()).resolve()
8 while (curdir / "__init__.py").is_file():
9 curdir = curdir.parent
10 for rc_name in RC_NAMES:
11 rc_path = curdir / rc_name
12 if rc_path.is_file():
13 yield rc_path.resolve()
Path 2: 4 calls (0.15)
PosixPath (4) None (4)
GeneratorExit (4)
1def _find_project_config() -> Iterator[Path]:
2 """Traverse up the directory tree to find a config file.
3
4 Stop if no '__init__' is found and thus we are no longer in a package.
5 """
6 if Path("__init__.py").is_file():
7 curdir = Path(os.getcwd()).resolve()
8 while (curdir / "__init__.py").is_file():
9 curdir = curdir.parent
10 for rc_name in RC_NAMES:
11 rc_path = curdir / rc_name
12 if rc_path.is_file():
13 yield rc_path.resolve()
Path 3: 2 calls (0.08)
1def _find_project_config() -> Iterator[Path]:
2 """Traverse up the directory tree to find a config file.
3
4 Stop if no '__init__' is found and thus we are no longer in a package.
5 """
6 if Path("__init__.py").is_file():
7 curdir = Path(os.getcwd()).resolve()
8 while (curdir / "__init__.py").is_file():
9 curdir = curdir.parent
10 for rc_name in RC_NAMES:
11 rc_path = curdir / rc_name
12 if rc_path.is_file():
13 yield rc_path.resolve()