Method: pylint.config.find_default_config_files._yield_default_files
Calls: 55, Exceptions: 30, Paths: 3Back
Path 1: 29 calls (0.53)
PosixPath (29)
GeneratorExit (29)
1def _yield_default_files() -> Iterator[Path]:
2 """Iterate over the default config file names and see if they exist."""
3 for config_name in CONFIG_NAMES:
4 try:
5 if config_name.is_file():
6 if config_name.suffix == ".toml" and not _toml_has_config(config_name):
7 continue
8 if config_name.suffix == ".cfg" and not _cfg_has_config(config_name):
9 continue
10
11 yield config_name.resolve()
12 except OSError:
13 pass
Path 2: 25 calls (0.45)
1def _yield_default_files() -> Iterator[Path]:
2 """Iterate over the default config file names and see if they exist."""
3 for config_name in CONFIG_NAMES:
4 try:
5 if config_name.is_file():
6 if config_name.suffix == ".toml" and not _toml_has_config(config_name):
7 continue
8 if config_name.suffix == ".cfg" and not _cfg_has_config(config_name):
9 continue
10
11 yield config_name.resolve()
12 except OSError:
13 pass
Path 3: 1 calls (0.02)
PermissionError (1)
1def _yield_default_files() -> Iterator[Path]:
2 """Iterate over the default config file names and see if they exist."""
3 for config_name in CONFIG_NAMES:
4 try:
5 if config_name.is_file():
6 if config_name.suffix == ".toml" and not _toml_has_config(config_name):
7 continue
8 if config_name.suffix == ".cfg" and not _cfg_has_config(config_name):
9 continue
10
11 yield config_name.resolve()
12 except OSError:
13 pass