aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.pylintrc58
-rwxr-xr-xpylint2
-rw-r--r--pyproject.toml69
3 files changed, 70 insertions, 59 deletions
diff --git a/.pylintrc b/.pylintrc
deleted file mode 100644
index 7bee576..0000000
--- a/.pylintrc
+++ /dev/null
@@ -1,58 +0,0 @@
-[MASTER]
-# List of plugins (as comma separated values of python modules names) to load,
-# usually to register additional checkers.
-load-plugins=
- pylint.extensions.bad_builtin,
- pylint.extensions.check_elif,
- pylint.extensions.docstyle,
- pylint.extensions.overlapping_exceptions,
- pylint.extensions.redefined_variable_type,
-
-jobs=0
-
-[MESSAGES CONTROL]
-# Disable the message, report, category or checker with the given id(s). You
-# can either give multiple identifier separated by comma (,) or put this option
-# multiple times (only on the command line, not in the configuration file where
-# it should appear only once).
-disable=
- too-many-lines,
- too-many-branches,
- too-many-statements,
- too-few-public-methods,
- too-many-instance-attributes,
- too-many-public-methods,
- too-many-locals,
- too-many-arguments,
- fixme,
- invalid-name,
-
-[REPORTS]
-reports=no
-score=no
-
-[FORMAT]
-max-line-length = 100
-indent-string = ' '
-
-[BASIC]
-bad-functions=
- exit,
- filter,
- input,
- map,
- quit,
-
-[SIMILARITIES]
-min-similarity-lines=20
-
-[VARIABLES]
-dummy-variables-rgx=_
-
-[DESIGN]
-max-parents=10
-
-[IMPORTS]
-deprecated-modules=
- mox,
- optparse,
diff --git a/pylint b/pylint
index 512511e..29e8b5e 100755
--- a/pylint
+++ b/pylint
@@ -37,7 +37,7 @@ def main(argv):
pythonpath = pympath + ":" + pythonpath
os.environ["PYTHONPATH"] = pythonpath
- pylintrc = os.path.join(source_root, ".pylintrc")
+ pylintrc = os.path.join(source_root, "pyproject.toml")
cmd = ["pylint", "--rcfile", pylintrc]
os.execvp(cmd[0], cmd + argv)
diff --git a/pyproject.toml b/pyproject.toml
index ab0fde0..e633a0a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -40,3 +40,72 @@ single_line_exclusions = [
# https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
python_version = "3.8"
+
+
+# https://pylint.pycqa.org/en/latest/user_guide/usage/run.html
+[tool.pylint."MASTER"]
+py-version = "3.8"
+
+# List of plugins (as comma separated values of python modules names) to load,
+# usually to register additional checkers.
+load-plugins = [
+ "pylint.extensions.bad_builtin",
+ "pylint.extensions.check_elif",
+ "pylint.extensions.docstyle",
+ "pylint.extensions.overlapping_exceptions",
+ "pylint.extensions.redefined_variable_type",
+]
+
+# Run everything in parallel.
+jobs = 0
+
+# https://pylint.pycqa.org/en/latest/user_guide/messages/index.html
+[tool.pylint."MESSAGES CONTROL"]
+# Disable the message, report, category or checker with the given id(s). You
+# can either give multiple identifier separated by comma (,) or put this option
+# multiple times (only on the command line, not in the configuration file where
+# it should appear only once).
+disable = [
+ "too-many-lines",
+ "too-many-branches",
+ "too-many-statements",
+ "too-few-public-methods",
+ "too-many-instance-attributes",
+ "too-many-public-methods",
+ "too-many-locals",
+ "too-many-arguments",
+ "fixme",
+ "invalid-name",
+]
+
+[tool.pylint."REPORTS"]
+reports = false
+score = false
+
+[tool.pylint."FORMAT"]
+max-line-length = 100
+indent-string = " "
+
+[tool.pylint."BASIC"]
+bad-functions = [
+ "exit",
+ "filter",
+ "input",
+ "map",
+ "quit",
+]
+
+[tool.pylint."SIMILARITIES"]
+min-similarity-lines = 20
+
+[tool.pylint."VARIABLES"]
+dummy-variables-rgx = "_"
+
+[tool.pylint."DESIGN"]
+max-parents = 10
+
+[tool.pylint."IMPORTS"]
+deprecated-modules = [
+ "mox",
+ "optparse",
+]