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