Checks if the symbol name correspond to the file path in the form `bar/__init__.py` or `foo/bar.py`.
(name: &str, path: &Path)
| 187 | /// Checks if the symbol name correspond to the file path in the form `bar/__init__.py` |
| 188 | /// or `foo/bar.py`. |
| 189 | pub fn is_python_module(name: &str, path: &Path) -> bool { |
| 190 | is_python_dir_module(name, path) |
| 191 | || path.ends_with(format!("{name}.py")) |
| 192 | || path.ends_with(format!("{name}.pyi")) |
| 193 | } |
| 194 | |
| 195 | fn is_python_dir_module(name: &str, path: &Path) -> bool { |
| 196 | path.ends_with(format!("{name}/__init__.py")) || path.ends_with(format!("{name}/__init__.pyi")) |
no test coverage detected