summaryrefslogtreecommitdiff
path: root/.pylintrc
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 /.pylintrc
parenta5dacf7092f51055dd774a1911a48815bb9a1e0e (diff)
downloadmongo-c50c68fef179d9306f1a3432f48985bf20555e38.tar.gz
SERVER-23312 Python linting - Lint using pylint, pydocstyle & mypy
Diffstat (limited to '.pylintrc')
-rw-r--r--.pylintrc25
1 files changed, 25 insertions, 0 deletions
diff --git a/.pylintrc b/.pylintrc
new file mode 100644
index 00000000000..7bd38008874
--- /dev/null
+++ b/.pylintrc
@@ -0,0 +1,25 @@
+# See https://www.pylint.org/
+[BASIC]
+# Permit 2 character & long argument names, like db
+argument-rgx=[a-z_][a-z0-9_]{1,50}$
+# Long attribute names
+attr-rgx=[a-z_][a-z0-9_]{2,50}$
+# Long function names
+function-rgx=[a-z_][a-z0-9_]{2,50}$
+# Long method names
+method-rgx=[a-z_][a-z0-9_]{2,50}$
+# Permit 2 character & long variable names, like sb
+variable-rgx=[a-z_][a-z0-9_]{1,50}$
+
+[MESSAGES CONTROL]
+# C0301 - line-too-long - some of the type annotations are longer then 100 columns
+# C0330 - bad-continuation - ignore conflicts produced by yapf formatting
+# E0401 - import-error - ignore imports that fail to load
+# E1101 - no-member - ignore maybe no member warnings
+# I0011 - locally-disabled - ignore warnings about disable pylint checks
+# R0204 - redefined-variable-type
+# R0903 - too-few-public-methods - pylint does not always know best
+# W0511 - fixme - ignore TODOs in comments
+# W0611 - unused-import - typing module is needed for mypy
+
+disable=bad-continuation,fixme,import-error,line-too-long,no-member,locally-disabled,redefined-variable-type,too-few-public-methods,unused-import