(file: str)
| 900 | |
| 901 | |
| 902 | def is_stub_package_file(file: str) -> bool: |
| 903 | # Use hacky heuristics to check whether file is part of a PEP 561 stub package. |
| 904 | if not file.endswith(".pyi"): |
| 905 | return False |
| 906 | return any(component.endswith("-stubs") for component in os.path.split(os.path.abspath(file))) |
| 907 | |
| 908 | |
| 909 | def unnamed_function(name: str | None) -> bool: |