summaryrefslogtreecommitdiffstats
path: root/Doc/howto
diff options
context:
space:
mode:
authorJelle Zijlstra <jelle.zijlstra@gmail.com>2023-11-08 14:38:36 (GMT)
committerGitHub <noreply@github.com>2023-11-08 14:38:36 (GMT)
commit8ab7ad63086b1793c24b1c5aaa19b60fc0e6540e (patch)
treea691b36575ebda3b0e557355eca276870f3f67b7 /Doc/howto
parent82e36dba45b750ad4ed68735eb05bb939968a1fa (diff)
downloadcpython-8ab7ad63086b1793c24b1c5aaa19b60fc0e6540e.zip
cpython-8ab7ad63086b1793c24b1c5aaa19b60fc0e6540e.tar.gz
cpython-8ab7ad63086b1793c24b1c5aaa19b60fc0e6540e.tar.bz2
Glossary: Add "static type checker" (#111837)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Diffstat (limited to 'Doc/howto')
-rw-r--r--Doc/howto/pyporting.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/howto/pyporting.rst b/Doc/howto/pyporting.rst
index 6c30a0d..501b16d 100644
--- a/Doc/howto/pyporting.rst
+++ b/Doc/howto/pyporting.rst
@@ -39,7 +39,8 @@ are:
#. Once your dependencies are no longer blocking you, use continuous integration
to make sure you stay compatible with Python 2 and 3 (tox_ can help test
against multiple versions of Python; ``python -m pip install tox``)
-#. Consider using optional static type checking to make sure your type usage
+#. Consider using optional :term:`static type checking <static type checker>`
+ to make sure your type usage
works in both Python 2 and 3 (e.g. use mypy_ to check your typing under both
Python 2 and Python 3; ``python -m pip install mypy``).
@@ -395,7 +396,7 @@ comparisons occur, making the mistake much easier to track down.
Consider using optional static type checking
--------------------------------------------
-Another way to help port your code is to use a static type checker like
+Another way to help port your code is to use a :term:`static type checker` like
mypy_ or pytype_ on your code. These tools can be used to analyze your code as
if it's being run under Python 2, then you can run the tool a second time as if
your code is running under Python 3. By running a static type checker twice like