]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Add .pylintrc to globally suppress warnings we don't really care about 28743/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 9 Aug 2023 19:57:47 +0000 (21:57 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 10 Aug 2023 16:13:29 +0000 (18:13 +0200)
Also, drop the respective disable directives from existing files.

.pylintrc [new file with mode: 0644]
src/kernel-install/60-ukify.install.in
src/ukify/test/test_ukify.py
src/ukify/ukify.py
test/test-exec-deserialization.py
test/test-network/systemd-networkd-tests.py
test/test-shutdown.py
test/test-udev.py
tools/elf2efi.py

diff --git a/.pylintrc b/.pylintrc
new file mode 100644 (file)
index 0000000..afd811a
--- /dev/null
+++ b/.pylintrc
@@ -0,0 +1,23 @@
+[MAIN]
+extension-pkg-allow-list=lxml
+
+[MESSAGES CONTROL]
+disable=fixme,
+        invalid-name,
+        line-too-long,
+        missing-class-docstring,
+        missing-docstring,
+        missing-function-docstring,
+        missing-module-docstring,
+        too-few-public-methods,
+        too-many-arguments,
+        too-many-boolean-expressions,
+        too-many-branches,
+        too-many-instance-attributes,
+        too-many-instance-attributes,
+        too-many-lines,
+        too-many-locals,
+        too-many-public-methods,
+        too-many-return-statements,
+        too-many-statements,
+        unspecified-encoding,
index ecef36b324918cf6cac24566c15ddb1c71f417d5..e5d68f37c0a6da00c11921b0101546f82b7c5a8b 100755 (executable)
 # You should have received a copy of the GNU Lesser General Public License
 # along with systemd; If not, see <https://www.gnu.org/licenses/>.
 
-# pylint: disable=missing-docstring,invalid-name,import-outside-toplevel
-# pylint: disable=consider-using-with,unspecified-encoding,line-too-long
-# pylint: disable=too-many-locals,too-many-statements,too-many-return-statements
-# pylint: disable=too-many-branches,redefined-builtin,fixme
+# pylint: disable=import-outside-toplevel,consider-using-with,disable=redefined-builtin
 
 import argparse
 import os
index 9a07f3397c4698a384ddf462206071b66c2b91f7..c83435ec184f745adae4c329312d733ef0a5db0b 100755 (executable)
@@ -1,10 +1,9 @@
 #!/usr/bin/env python3
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-# pylint: disable=missing-docstring,redefined-outer-name,invalid-name
 # pylint: disable=unused-import,import-outside-toplevel,useless-else-on-loop
 # pylint: disable=consider-using-with,wrong-import-position,unspecified-encoding
-# pylint: disable=protected-access
+# pylint: disable=protected-access,redefined-outer-name
 
 import base64
 import json
index cf7db49bdd18aba682b624e8d86930f2a74fc6f4..0ddf56ae5e2dabab308608ff9d8bfa7f9b70a36d 100755 (executable)
 # You should have received a copy of the GNU Lesser General Public License
 # along with systemd; If not, see <https://www.gnu.org/licenses/>.
 
-# pylint: disable=missing-docstring,invalid-name,import-outside-toplevel
-# pylint: disable=consider-using-with,unspecified-encoding,line-too-long
-# pylint: disable=too-many-locals,too-many-statements,too-many-return-statements
-# pylint: disable=too-many-branches,too-many-lines,too-many-instance-attributes
-# pylint: disable=too-many-arguments,unnecessary-lambda-assignment,fixme
-# pylint: disable=unused-argument
+# pylint: disable=import-outside-toplevel,consider-using-with,unused-argument
+# pylint: disable=unnecessary-lambda-assignment
 
 import argparse
 import configparser
index 7fbf9a4d1714c4d330368dce8f3d88ee979c126e..f8f3a6d272a635746025982ad97437f0732460c6 100755 (executable)
@@ -1,8 +1,5 @@
 #!/usr/bin/env python3
 # SPDX-License-Identifier: LGPL-2.1-or-later
-# pylint: disable=line-too-long,too-many-lines,too-many-branches,too-many-statements,too-many-arguments
-# pylint: disable=too-many-public-methods,too-many-boolean-expressions,invalid-name,no-self-use
-# pylint: disable=missing-function-docstring,missing-class-docstring,missing-module-docstring
 #
 #  Copyright © 2017 Michal Sekletar <msekleta@redhat.com>
 
index 7f922b46f6cebade45d5b418ed4d491bd8323a1f..07afe354f79ec636ca51eb86d2835ffd11eed91c 100755 (executable)
@@ -1,8 +1,5 @@
 #!/usr/bin/env python3
 # SPDX-License-Identifier: LGPL-2.1-or-later
-# pylint: disable=line-too-long,too-many-lines,too-many-branches,too-many-statements,too-many-arguments
-# pylint: disable=too-many-public-methods,too-many-boolean-expressions,invalid-name
-# pylint: disable=missing-function-docstring,missing-class-docstring,missing-module-docstring
 # systemd-networkd tests
 
 # These tests can be executed in the systemd mkosi image when booted in QEMU. After booting the QEMU VM,
index 700e77a15db34b8235dec2fe0832817a4c9a730d..5339afcdd09147ef5301626a6e3642d5933ff088 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/python3
 # SPDX-License-Identifier: LGPL-2.1-or-later
-# pylint: disable=line-too-long,invalid-name,missing-module-docstring,missing-function-docstring,too-many-statements,broad-except
+# pylint: disable=broad-except
 
 import argparse
 import logging
index 02383ce4e9b0d7bb28474e39a868c2b64788de2a..5a95b9c521315fd9aa05a1137cee0326d5ed659c 100755 (executable)
@@ -1,10 +1,8 @@
 #!/usr/bin/env python3
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-# pylint: disable=missing-docstring,redefined-outer-name,invalid-name
-# pylint: disable=unspecified-encoding,no-else-return,line-too-long,too-many-lines
-# pylint: disable=multiple-imports,too-many-instance-attributes,consider-using-with
-# pylint: disable=global-statement
+# pylint: disable=redefined-outer-name,no-else-return,multiple-imports
+# pylint: disable=consider-using-with,global-statement
 
 # udev test
 #
index 2e478940f5c17fff15eb0c2dea79ab243ac733cf..c683c120762fd2bc1d6fd0cdf7ef334ecdc9a74b 100755 (executable)
@@ -19,7 +19,7 @@
 # the resulting binary useless. gnu-efi relies on this method and contains a stub that performs the
 # ELF dynamic relocations at runtime.
 
-# pylint: disable=missing-docstring,invalid-name,attribute-defined-outside-init
+# pylint: disable=attribute-defined-outside-init
 
 import argparse
 import hashlib