From 497fcfc84888131c44d03c81b2cb5a92e27f708b Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 2 Feb 2023 15:30:15 +0100 Subject: [PATCH] silence new pylint checks that are too much for the current state Ideally, these would be fixed. But it'll be a project. * C0201: Consider iterating the dictionary directly instead of calling .keys() (consider-iterating-dictionary) * R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return) * R1720: Unnecessary "elif" after "raise", remove the leading "el" from "elif" (no-else-raise) * R1720: Unnecessary "else" after "raise", remove the "else" and de-indent the code inside it (no-else-raise) * R1722: Consider using 'sys.exit' instead (consider-using-sys-exit) * R1723: Unnecessary "elif" after "break", remove the leading "el" from "elif" (no-else-break) * R1724: Unnecessary "elif" after "continue", remove the leading "el" from "elif" (no-else-continue) * R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal) * W0133: Exception statement has no effect (pointless-exception-statement) * W0718: Catching too general exception Exception (broad-exception-caught) * W0719: Raising too general exception: Exception (broad-exception-raised) * W1510: 'subprocess.run' used without explicitly defining the value for 'check'. (subprocess-run-check) --- pyproject.toml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9e7fc078..f4f8c7b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,27 @@ confidence = ["HIGH", "INFERENCE"] # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use "--disable=all --enable=classes # --disable=W". -disable = ["invalid-name", "missing-module-docstring", "missing-class-docstring", "missing-function-docstring", "no-member"] + +# TODO many of these could be fixed if someone wants to spend the time +disable = [ + "broad-exception-caught", + "broad-exception-raised", + "consider-iterating-dictionary", + "consider-using-sys-exit", + "invalid-name", + "missing-class-docstring", + "missing-function-docstring", + "missing-module-docstring", + "no-else-break", + "no-else-continue", + "no-else-raise", + "no-else-return", + "no-member", + "pointless-exception-statement", + "subprocess-run-check", + "use-dict-literal", +] + [tool.pylint.miscellaneous] # List of note tags to take in consideration, separated by a comma.