commit:     756eda7dbce4261e2d5cd6e38bab49aa457e99c1
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 10 07:43:19 2024 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Jan 10 07:43:19 2024 +0000
URL:        https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=756eda7d

pylintrc: merge into pyproject.toml

The same settings, but we have a single file for all our configs now.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 .pylintrc      | 58 ------------------------------------------------
 pylint         |  2 +-
 pyproject.toml | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 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",
+]

Reply via email to