Skip to content

Commit 7181f96

Browse files
authored
Update getting_started.rst to add uv
1 parent 7b4f631 commit 7181f96

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

docs/source/getting_started.rst

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,46 @@ If you're unfamiliar with the concepts of static and dynamic type checking,
1313
be sure to read this chapter carefully, as the rest of the documentation
1414
may not make much sense otherwise.
1515

16-
Installing and running mypy
17-
***************************
16+
Installing mypy
17+
***************
1818

19-
Mypy requires Python 3.9 or later to run. You can install mypy using pip:
19+
Mypy requires Python 3.9 or later to run, and can be installed through either pip or uv.
20+
21+
With pip
22+
~~~~~~~~
23+
24+
You can install mypy with pip:
2025

2126
.. code-block:: shell
2227
2328
$ python3 -m pip install mypy
2429
25-
Once mypy is installed, run it by using the ``mypy`` tool:
30+
With uv
31+
~~~~~~~
32+
33+
You can also install mypy with uv:
34+
35+
.. code-block:: shell
36+
37+
$ uv add mypy
38+
39+
Running mypy
40+
************
41+
42+
Once mypy is installed, run it by using the ``mypy`` tool. The command that you use to run mypy depends on wether you installed it with pip or uv.
43+
44+
For pip, use:
2645

2746
.. code-block:: shell
2847
2948
$ mypy program.py
3049
50+
For uv, use:
51+
52+
.. code-block:: shell
53+
54+
$ uv run mypy program.py
55+
3156
This command makes mypy *type check* your ``program.py`` file and print
3257
out any errors it finds. Mypy will type check your code *statically*: this
3358
means that it will check for errors without ever running your code, just

0 commit comments

Comments
 (0)