(flags: list[str], allow_sources: bool)
| 136 | |
| 137 | |
| 138 | def process_start_options(flags: list[str], allow_sources: bool) -> Options: |
| 139 | _, options = mypy.main.process_options( |
| 140 | ["-i"] + flags, require_targets=False, server_options=True |
| 141 | ) |
| 142 | if options.report_dirs: |
| 143 | print("dmypy: Ignoring report generation settings. Start/restart cannot generate reports.") |
| 144 | if options.junit_xml: |
| 145 | print( |
| 146 | "dmypy: Ignoring report generation settings. " |
| 147 | "Start/restart does not support --junit-xml. Pass it to check/recheck instead" |
| 148 | ) |
| 149 | options.junit_xml = None |
| 150 | if not options.incremental: |
| 151 | sys.exit("dmypy: start/restart should not disable incremental mode") |
| 152 | if options.follow_imports not in ("skip", "error", "normal"): |
| 153 | sys.exit("dmypy: follow-imports=silent not supported") |
| 154 | if not options.local_partial_types: |
| 155 | sys.exit("dmypy: disabling local-partial-types not supported") |
| 156 | return options |
| 157 | |
| 158 | |
| 159 | def ignore_suppressed_imports(module: str) -> bool: |
no test coverage detected
searching dependent graphs…