@@ -61,10 +61,19 @@ Mypy can be installed using pip:
61
61
62
62
$ pip install mypy-lang
63
63
64
- Depending on your configuration, you may have to use ` pip3 `
65
- instead :
64
+ Now, if Python on your system is configured properly (else see
65
+ "Troubleshooting" below), you can type-check a program like this :
66
66
67
- $ pip3 install mypy-lang
67
+ $ mypy PROGRAM
68
+
69
+ You can always use a Python interpreter to run your statically typed
70
+ programs, even if they have type errors:
71
+
72
+ $ python3 PROGRAM
73
+
74
+
75
+ Quick start for contributing to mypy
76
+ ------------------------------------
68
77
69
78
If you want to contribute, first clone the mypy git repository:
70
79
@@ -79,30 +88,34 @@ the above as root. For example, in Ubuntu and Mac OS X:
79
88
80
89
$ sudo python3 setup.py install
81
90
82
- This installs the ` mypy ` script and dependencies, including the
83
- ` typing ` module, to system-dependent locations. Sometimes the script
84
- directory will not be in ` PATH ` , and you have to add the target
85
- directory to ` PATH ` manually or create a symbolic link to the script.
86
- In particular, on Mac OS X, the script may be installed under
87
- ` /Library/Frameworks ` :
91
+ Now you can use the ` mypy ` program just as above. In case of trouble
92
+ see "Troubleshooting" below.
88
93
89
- /Library/Frameworks/Python.framework/Versions/<version>/bin
90
94
91
- Now, on a Unix-like system, you can type check a program like this:
95
+ Troubleshooting
96
+ ---------------
92
97
93
- $ mypy PROGRAM
98
+ Depending on your configuration, ` pip ` may correspond to Python 2 and
99
+ you may have to use ` pip3 ` instead for installation:
100
+
101
+ $ pip3 install mypy-lang
102
+
103
+ If the ` mypy ` command isn't found after installation: After either
104
+ ` pip install ` or ` setup.py install ` , the ` mypy ` script and
105
+ dependencies, including the ` typing ` module, will be installed to
106
+ system-dependent locations. Sometimes the script directory will not
107
+ be in ` PATH ` , and you have to add the target directory to ` PATH `
108
+ manually or create a symbolic link to the script. In particular, on
109
+ Mac OS X, the script may be installed under ` /Library/Frameworks ` :
110
+
111
+ /Library/Frameworks/Python.framework/Versions/<version>/bin
94
112
95
113
In Windows, the script is generally installed in
96
114
` \PythonNN\Scripts ` . So, type check a program like this (replace
97
115
` \Python34 ` with your Python installation path):
98
116
99
117
C:\>\Python34\python \Python34\Scripts\mypy PROGRAM
100
118
101
- You can always use a Python interpreter to run your statically typed
102
- programs, even if they have type errors:
103
-
104
- $ python3 PROGRAM
105
-
106
119
107
120
Web site and documentation
108
121
--------------------------
0 commit comments