Write a file containing missing stub packages. This allows a subsequent "mypy --install-types" run (without other arguments) to install missing stub packages.
(cache_dir: str, missing_stub_packages: set[str])
| 5112 | |
| 5113 | |
| 5114 | def record_missing_stub_packages(cache_dir: str, missing_stub_packages: set[str]) -> None: |
| 5115 | """Write a file containing missing stub packages. |
| 5116 | |
| 5117 | This allows a subsequent "mypy --install-types" run (without other arguments) |
| 5118 | to install missing stub packages. |
| 5119 | """ |
| 5120 | fnam = missing_stubs_file(cache_dir) |
| 5121 | if missing_stub_packages: |
| 5122 | with open(fnam, "w") as f: |
| 5123 | for pkg in sorted(missing_stub_packages): |
| 5124 | f.write(f"{pkg}\n") |
| 5125 | else: |
| 5126 | if os.path.isfile(fnam): |
| 5127 | os.remove(fnam) |
| 5128 | |
| 5129 | |
| 5130 | def is_silent_import_module(manager: BuildManager, path: str) -> bool: |
no test coverage detected
searching dependent graphs…