(file_path: Path, parent: nodes.Collector)
| 193 | |
| 194 | |
| 195 | def pytest_collect_file(file_path: Path, parent: nodes.Collector) -> Module | None: |
| 196 | if file_path.suffix == ".py": |
| 197 | if not parent.session.isinitpath(file_path): |
| 198 | if not path_matches_patterns( |
| 199 | file_path, parent.config.getini("python_files") |
| 200 | ): |
| 201 | return None |
| 202 | ihook = parent.session.gethookproxy(file_path) |
| 203 | module: Module = ihook.pytest_pycollect_makemodule( |
| 204 | module_path=file_path, parent=parent |
| 205 | ) |
| 206 | return module |
| 207 | return None |
| 208 | |
| 209 | |
| 210 | def path_matches_patterns(path: Path, patterns: Iterable[str]) -> bool: |
nothing calls this directly
no test coverage detected