| 1 |
===== |
| 2 |
dmypy |
| 3 |
===== |
| 4 |
|
| 5 |
SYNOPSIS |
| 6 |
======== |
| 7 |
|
| 8 |
**dmypy** [OPTIONS...] `COMMAND`] [COMMAND OPTIONS ...] |
| 9 |
|
| 10 |
DESCRIPTION |
| 11 |
=========== |
| 12 |
|
| 13 |
Mypy can run as a long-running daemon (server) process allowing to perform |
| 14 |
type checking much faster, since program state cached from previous runs |
| 15 |
is kept in memory and doesn’t have to be read from the file system |
| 16 |
on each run. The server also uses finer-grained dependency tracking to |
| 17 |
reduce the amount of work that needs to be done. |
| 18 |
|
| 19 |
If you have a large codebase to check, running mypy using the mypy daemon |
| 20 |
can be 10 or more times faster than the regular command-line **mypy** tool, |
| 21 |
especially if your workflow involves running mypy repeatedly after |
| 22 |
small edits – which is often a good idea, as this way you’ll find |
| 23 |
errors sooner. |
| 24 |
|
| 25 |
Dmypy is a command-line client to send type-checking requests to the server. |
| 26 |
|
| 27 |
COMMANDS |
| 28 |
======== |
| 29 |
|
| 30 |
start [--log-file `FILE`] [--timeout `TIMEOUT`] `ARGS`... |
| 31 |
********************************************************* |
| 32 |
|
| 33 |
Start a mypy daemon. |
| 34 |
|
| 35 |
Runs a new mypy daemon, passing regular mypy flags to it. |
| 36 |
If `--log-file` is used, directs daemon stdout/stderr to `FILE`. |
| 37 |
`--timeout` specifies the server shutdown timeout in seconds. |
| 38 |
|
| 39 |
stop |
| 40 |
**** |
| 41 |
|
| 42 |
Stop a mypy daemon. |
| 43 |
|
| 44 |
Politely asks the currently running mypy daemon to go away. |
| 45 |
|
| 46 |
kill |
| 47 |
**** |
| 48 |
|
| 49 |
Kill a mypy daemon. |
| 50 |
|
| 51 |
Kills the process of the currently running mypy daemon. |
| 52 |
|
| 53 |
restart [--log-file `FILE`] [--timeout `TIMEOUT`] `ARGS`... |
| 54 |
*********************************************************** |
| 55 |
|
| 56 |
Restart a mypy daemon. |
| 57 |
|
| 58 |
Stops the existing and then runs a new mypy daemon, passing regular mypy flags to it. |
| 59 |
If `--log-file` is used, directs daemon stdout/stderr to `FILE`. |
| 60 |
`--timeout` specifies the server shutdown timeout in seconds. |
| 61 |
|
| 62 |
status [-v] |
| 63 |
*********** |
| 64 |
|
| 65 |
Show a mypy daemon status. |
| 66 |
|
| 67 |
If `-v` or `--verbose` is used, prints detailed status. |
| 68 |
|
| 69 |
daemon [--timeout `TIMEOUT`] `ARGS`... |
| 70 |
************************************** |
| 71 |
|
| 72 |
Run a mypy daemon in the foreground, passing regular mypy flags to it. |
| 73 |
|
| 74 |
`--timeout` specifies the server shutdown timeout in seconds. |
| 75 |
|
| 76 |
check [-v] [--junit-xml `JUNIT_XML`] [--perf-stats-file `PERF_STATS_FILE`] `FILE` [`FILE` ...] |
| 77 |
********************************************************************************************** |
| 78 |
|
| 79 |
Check some files. |
| 80 |
|
| 81 |
Tell the currently running mypy daemon to check some files. This requires the daemon to already be running. |
| 82 |
|
| 83 |
-v, --verbose Print detailed status |
| 84 |
--junit-xml JUNIT_XML Write junit.xml to the given file |
| 85 |
--perf-stats-file PERF_STATS_FILE Write telemetry information to the given file |
| 86 |
|
| 87 |
recheck [-v] [--junit-xml `JUNIT_XML`] [--perf-stats-file `PERF_STATS_FILE`] [--update `FILE` [`FILE` ...]] [--remove `FILE` [`FILE` ...]] |
| 88 |
****************************************************************************************************************************************** |
| 89 |
|
| 90 |
Re-check the previous list of files, with optional modifications. This requires the daemon to already be running. |
| 91 |
|
| 92 |
-v, --verbose Print detailed status |
| 93 |
--junit-xml JUNIT_XML Write junit.xml to the given file |
| 94 |
--perf-stats-file PERF_STATS_FILE Write telemetry information to the given file |
| 95 |
|
| 96 |
run [-v] [--junit-xml `JUNIT_XML`] [--perf-stats-file `PERF_STATS_FILE`] [--timeout `TIMEOUT`] [--log-file `FILE`] `ARGS`... |
| 97 |
**************************************************************************************************************************** |
| 98 |
|
| 99 |
Check some files, (re)starting the daemon if necessary. |
| 100 |
|
| 101 |
-v, --verbose Print detailed status |
| 102 |
--junit-xml JUNIT_XML Write junit.xml to the given file |
| 103 |
--perf-stats-file PERF_STATS_FILE Write telemetry information to the given file |
| 104 |
--timeout TIMEOUT Server shutdown timeout (in seconds) |
| 105 |
--log-file FILE Direct daemon stdout/stderr to `FILE` |
| 106 |
|
| 107 |
hang |
| 108 |
**** |
| 109 |
|
| 110 |
Hang for 100 seconds. |
| 111 |
|
| 112 |
OPTIONS |
| 113 |
======= |
| 114 |
|
| 115 |
``-h``, ``--help`` |
| 116 |
Show a help message and exit. |
| 117 |
|
| 118 |
``--status-file`` `STATUS_FILE` |
| 119 |
Status file to retrieve daemon details to. |
| 120 |
|
| 121 |
``-V``, ``--version`` |
| 122 |
Show program’s version number and exit. |
| 123 |
|
| 124 |
SEE ALSO |
| 125 |
======== |
| 126 |
|
| 127 |
**mypy**\(1) |
| 128 |
|
| 129 |
Full documentation is available online at: https://mypy.readthedocs.io/en/latest/mypy_daemon.html |
| 130 |
or locally at: `/usr/share/doc/mypy/html <file:///usr/share/doc/mypy/html>`__ (requires `mypy-doc` package). |