From 3d4292e0694e1ec25c0d6000264478e255a12f5b Mon Sep 17 00:00:00 2001 From: matejcik Date: Tue, 28 Nov 2023 14:58:30 +0100 Subject: [PATCH] chore: move pylint config from setup.cfg to .pylintrc multiple bugreports complain about poor support for setup.cfg for instance, the load-plugins rule is ignored in setup.cfg --- .pylintrc | 37 +++++++++++++++++++++++++++++++++++++ setup.cfg | 35 ----------------------------------- 2 files changed, 37 insertions(+), 35 deletions(-) create mode 100644 .pylintrc diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 000000000..e47f2bc6c --- /dev/null +++ b/.pylintrc @@ -0,0 +1,37 @@ +[MASTER] +ignore-paths= + core/src/all_modules.py, + core/src/apps/ethereum/tokens.py, + core/src/trezor/res/resources.py, + core/src/trezor/messages.py, + core/src/trezor/enums, + crypto, + legacy, + storage, +fail-under=10.0 +jobs=0 +load-plugins=trezor_pylint_plugin + +[MESSAGE CONTROL] +disable=all +enable= + bad-plugin-value, + assignment-from-none, + chained-comparison, + consider-merging-isinstance, + consider-using-dict-comprehension, + consider-using-dict-items, + consider-using-f-string, + consider-using-in, + dangerous-default-value, + inconsistent-return-statements, + lost-exception, + pointless-string-statement, + simplifiable-if-statement, + super-init-not-called, + superfluous-parens, + unused-variable, + use-list-literal, + useless-else-on-loop, + useless-object-inheritance, + async-awaitable-return, diff --git a/setup.cfg b/setup.cfg index 93e3e9360..092a48db9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,38 +42,3 @@ warn_unused_ignores = True show_error_codes = True # type union operator support, should be removed after 3.10 is the default python_version = 3.10 - -[pylint.MASTER] -ignore-paths= - core/src/all_modules.py, - core/src/apps/ethereum/tokens.py, - core/src/trezor/res/resources.py, - core/src/trezor/messages.py, - core/src/trezor/enums, - crypto, - legacy, - storage, -fail-under=10.0 -jobs=0 - -[pylint."MESSAGE CONTROL"] -disable=all -enable= - assignment-from-none, - chained-comparison, - consider-merging-isinstance, - consider-using-dict-comprehension, - consider-using-dict-items, - consider-using-f-string, - consider-using-in, - dangerous-default-value, - inconsistent-return-statements, - lost-exception, - pointless-string-statement, - simplifiable-if-statement, - super-init-not-called, - superfluous-parens, - unused-variable, - use-list-literal, - useless-else-on-loop, - useless-object-inheritance,