The code is top-down.
(argv: list[str])
| 258 | |
| 259 | |
| 260 | def main(argv: list[str]) -> None: |
| 261 | """The code is top-down.""" |
| 262 | check_python_version("dmypy") |
| 263 | |
| 264 | # set recursion limit consistent with mypy/main.py |
| 265 | sys.setrecursionlimit(RECURSION_LIMIT) |
| 266 | |
| 267 | args = parser.parse_args(argv) |
| 268 | if not args.action: |
| 269 | parser.print_usage() |
| 270 | else: |
| 271 | try: |
| 272 | args.action(args) |
| 273 | except BadStatus as err: |
| 274 | fail(err.args[0]) |
| 275 | except Exception: |
| 276 | # We do this explicitly to avoid exceptions percolating up |
| 277 | # through mypy.api invocations |
| 278 | traceback.print_exc() |
| 279 | sys.exit(2) |
| 280 | |
| 281 | |
| 282 | def fail(msg: str) -> NoReturn: |
no test coverage detected
searching dependent graphs…