Add .pylintrc to globally suppress warnings we don't really care about

Also, drop the respective disable directives from existing files.
This commit is contained in:
Frantisek Sumsal 2023-08-09 21:57:47 +02:00
parent 2d49429e58
commit 79f902eb09
9 changed files with 31 additions and 24 deletions

23
.pylintrc Normal file
View File

@ -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,

View File

@ -17,10 +17,7 @@
# You should have received a copy of the GNU Lesser General Public License # You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <https://www.gnu.org/licenses/>. # along with systemd; If not, see <https://www.gnu.org/licenses/>.
# pylint: disable=missing-docstring,invalid-name,import-outside-toplevel # pylint: disable=import-outside-toplevel,consider-using-with,disable=redefined-builtin
# 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
import argparse import argparse
import os import os

View File

@ -1,10 +1,9 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1-or-later # 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=unused-import,import-outside-toplevel,useless-else-on-loop
# pylint: disable=consider-using-with,wrong-import-position,unspecified-encoding # pylint: disable=consider-using-with,wrong-import-position,unspecified-encoding
# pylint: disable=protected-access # pylint: disable=protected-access,redefined-outer-name
import base64 import base64
import json import json

View File

@ -16,12 +16,8 @@
# You should have received a copy of the GNU Lesser General Public License # You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <https://www.gnu.org/licenses/>. # along with systemd; If not, see <https://www.gnu.org/licenses/>.
# pylint: disable=missing-docstring,invalid-name,import-outside-toplevel # pylint: disable=import-outside-toplevel,consider-using-with,unused-argument
# pylint: disable=consider-using-with,unspecified-encoding,line-too-long # pylint: disable=unnecessary-lambda-assignment
# 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
import argparse import argparse
import configparser import configparser

View File

@ -1,8 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1-or-later # 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> # Copyright © 2017 Michal Sekletar <msekleta@redhat.com>

View File

@ -1,8 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1-or-later # 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 # systemd-networkd tests
# These tests can be executed in the systemd mkosi image when booted in QEMU. After booting the QEMU VM, # These tests can be executed in the systemd mkosi image when booted in QEMU. After booting the QEMU VM,

View File

@ -1,6 +1,6 @@
#!/usr/bin/python3 #!/usr/bin/python3
# SPDX-License-Identifier: LGPL-2.1-or-later # 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 argparse
import logging import logging

View File

@ -1,10 +1,8 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1-or-later # SPDX-License-Identifier: LGPL-2.1-or-later
# pylint: disable=missing-docstring,redefined-outer-name,invalid-name # pylint: disable=redefined-outer-name,no-else-return,multiple-imports
# pylint: disable=unspecified-encoding,no-else-return,line-too-long,too-many-lines # pylint: disable=consider-using-with,global-statement
# pylint: disable=multiple-imports,too-many-instance-attributes,consider-using-with
# pylint: disable=global-statement
# udev test # udev test
# #

View File

@ -19,7 +19,7 @@
# the resulting binary useless. gnu-efi relies on this method and contains a stub that performs the # the resulting binary useless. gnu-efi relies on this method and contains a stub that performs the
# ELF dynamic relocations at runtime. # ELF dynamic relocations at runtime.
# pylint: disable=missing-docstring,invalid-name,attribute-defined-outside-init # pylint: disable=attribute-defined-outside-init
import argparse import argparse
import hashlib import hashlib