@@ -36,24 +36,23 @@ Basic usage
36
36
***********
37
37
38
38
The client utility ``dmypy `` is used to control the mypy daemon.
39
- Use ``dmypy start -- <flags> `` to start the daemon. You can use almost
40
- arbitrary mypy flags after ``-- ``. The daemon will always run on the
41
- current host. Example::
39
+ Use ``dmypy run -- <flags> <files> `` to typecheck a set of files
40
+ (or directories). This will launch the daemon if it is not running.
41
+ You can use almost arbitrary mypy flags after ``-- ``. The daemon
42
+ will always run on the current host. Example::
42
43
43
- dmypy start -- --follow-imports=skip
44
+ dmypy run -- --follow-imports=error prog.py pkg1/ pkg2/
44
45
45
46
.. note ::
46
- You'll need to use either the ``--follow-imports=skip `` or the
47
- ``--follow-imports=error `` option with dmypy because the current
47
+ You'll need to use either the ``--follow-imports=error `` or the
48
+ ``--follow-imports=skip `` option with dmypy because the current
48
49
implementation can't follow imports.
49
50
See :ref: `follow-imports ` for details on how these work.
50
51
You can also define these using a
51
52
:ref: `configuration file <config-file >`.
52
53
53
- The daemon will not type check anything when it's started.
54
- Use ``dmypy check <files> `` to check some files (or directories)::
55
-
56
- dmypy check prog.py pkg1/ pkg2/
54
+ ``dmypy run `` will automatically restart the daemon if the
55
+ configuration or mypy version changes.
57
56
58
57
You need to provide all files or directories you want to type check
59
58
(other than stubs) as arguments. This is a result of the
@@ -68,28 +67,39 @@ you have a large codebase.
68
67
Additional features
69
68
*******************
70
69
71
- You have precise control over the lifetime of the daemon process:
70
+ While ``dmypy run `` is sufficient for most uses, some workflows
71
+ (ones using :ref: `remote caching <remote-cache >`, perhaps),
72
+ require more precise control over the lifetime of the daemon process:
72
73
73
74
* ``dmypy stop `` stops the daemon.
74
75
76
+ * ``dmypy start -- <flags> `` starts the daemon but does not check any files.
77
+ You can use almost arbitrary mypy flags after ``-- ``.
78
+
75
79
* ``dmypy restart -- <flags> `` restarts the daemon. The flags are the same
76
80
as with ``dmypy start ``. This is equivalent to a stop command followed
77
81
by a start.
78
82
79
- * Use ``dmypy start --timeout SECONDS -- <flags> `` (or
80
- ``dmypy restart --timeout SECONDS -- <flags> ``) to automatically
83
+ * Use ``dmypy run --timeout SECONDS -- <flags> `` (or
84
+ ``start `` or `` restart ``) to automatically
81
85
shut down the daemon after inactivity. By default, the daemon runs
82
86
until it's explicitly stopped.
83
87
88
+ * ``dmypy check <files> `` checks a set of files using an already
89
+ running daemon.
90
+
91
+ * ``dmypy status `` checks whether a daemon is running. It prints a
92
+ diagnostic and exits with ``0 `` if there is a running daemon.
93
+
84
94
Use ``dmypy --help `` for help on additional commands and command-line
85
95
options not discussed here, and ``dmypy <command> --help `` for help on
86
96
command-specific options.
87
97
88
98
Limitations
89
99
***********
90
100
91
- * You have to use either the ``--follow-imports=skip `` or
92
- the ``--follow-imports=error `` option because of an implementation
101
+ * You have to use either the ``--follow-imports=error `` or
102
+ the ``--follow-imports=skip `` option because of an implementation
93
103
limitation. This can be defined
94
104
through the command line or through a
95
105
:ref: `configuration file <config-file >`.
0 commit comments