diff options
author | 2024-01-10 02:43:19 -0500 | |
---|---|---|
committer | 2024-01-10 02:43:19 -0500 | |
commit | 756eda7dbce4261e2d5cd6e38bab49aa457e99c1 (patch) | |
tree | 8c5467bfba53e0ff8103bf8107964311db50b6c4 | |
parent | pyproject.toml: add black & isort & mypy settings (diff) | |
download | pax-utils-756eda7dbce4261e2d5cd6e38bab49aa457e99c1.tar.gz pax-utils-756eda7dbce4261e2d5cd6e38bab49aa457e99c1.tar.bz2 pax-utils-756eda7dbce4261e2d5cd6e38bab49aa457e99c1.zip |
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@gentoo.org>
-rw-r--r-- | .pylintrc | 58 | ||||
-rwxr-xr-x | pylint | 2 | ||||
-rw-r--r-- | 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, @@ -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", +] |