(
config_layers: list[tuple[Path, dict[str, Any]]], project_root: Path
)
| 233 | |
| 234 | |
| 235 | def project_trust_level( |
| 236 | config_layers: list[tuple[Path, dict[str, Any]]], project_root: Path |
| 237 | ) -> str | None: |
| 238 | for _path, config in reversed(config_layers): |
| 239 | projects = config.get("projects") |
| 240 | if not isinstance(projects, dict): |
| 241 | continue |
| 242 | project = projects.get(str(project_root)) |
| 243 | if not isinstance(project, dict): |
| 244 | continue |
| 245 | trust_level = project.get("trust_level") |
| 246 | if isinstance(trust_level, str): |
| 247 | return trust_level |
| 248 | return None |
| 249 | |
| 250 | |
| 251 | def project_config_paths(project_root: Path, cwd: Path) -> list[Path]: |
no test coverage detected