()
| 10 | |
| 11 | |
| 12 | def _resolve_config_candidates() -> list[BaseConfig]: |
| 13 | git_project_root = git.find_git_project_root() |
| 14 | cfg_search_paths = [Path(".")] |
| 15 | |
| 16 | if git_project_root and cfg_search_paths[0].resolve() != git_project_root.resolve(): |
| 17 | cfg_search_paths.append(git_project_root) |
| 18 | |
| 19 | candidates: list[BaseConfig] = [] |
| 20 | for dir in cfg_search_paths: |
| 21 | for filename in defaults.CONFIG_FILES: |
| 22 | out_path = dir / filename |
| 23 | if out_path.is_file(): |
| 24 | conf = _create_config_from_path(out_path) |
| 25 | if conf.contains_commitizen_section(): |
| 26 | candidates.append(conf) |
| 27 | return candidates |
| 28 | |
| 29 | |
| 30 | def _create_config_from_path(path: Path) -> BaseConfig: |
no test coverage detected
searching dependent graphs…