summaryrefslogtreecommitdiff
path: root/mypy.ini
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2018-03-27 14:30:46 -0400
committerJonathan Abrahams <jonathan@mongodb.com>2018-04-05 14:41:58 -0400
commitc50c68fef179d9306f1a3432f48985bf20555e38 (patch)
treea1c208329a090c54a8a1f02558b2be87b830a8ab /mypy.ini
parenta5dacf7092f51055dd774a1911a48815bb9a1e0e (diff)
downloadmongo-c50c68fef179d9306f1a3432f48985bf20555e38.tar.gz
SERVER-23312 Python linting - Lint using pylint, pydocstyle & mypy
Diffstat (limited to 'mypy.ini')
-rw-r--r--mypy.ini20
1 files changed, 20 insertions, 0 deletions
diff --git a/mypy.ini b/mypy.ini
new file mode 100644
index 00000000000..7d3f3753832
--- /dev/null
+++ b/mypy.ini
@@ -0,0 +1,20 @@
+[mypy]
+# Check Python 2 code for type annotations in comments.
+python_version = 2.7
+
+[mypy-*]
+disallow_untyped_defs = False
+# Do not error on imported files since all imported files may not be mypy clean.
+follow_imports = silent
+# Do not error if imports are not found.
+# This can be a problem with standalone scripts and relative imports.
+# This will limit effectiveness but avoids mypy complaining about running code.
+ignore_missing_imports = True
+
+[mypy-idl*]
+# Error if any code is missing type annotations.
+disallow_untyped_defs = True
+
+[mypy-lint*]
+# Error if any code is missing type annotations.
+disallow_untyped_defs = True