From f4e826e65dc7de8a2b40fbae1201dbb4c08f8c5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 19 Feb 2021 15:26:34 +0100 Subject: [PATCH] qvm-template: mute pylint complains about typing.NamedTuple This is false positive, PyCQA/pylint#3732 --- qubesadmin/tools/qvm_template.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qubesadmin/tools/qvm_template.py b/qubesadmin/tools/qvm_template.py index 6eb65e4..9991d13 100644 --- a/qubesadmin/tools/qvm_template.py +++ b/qubesadmin/tools/qvm_template.py @@ -254,6 +254,8 @@ class VersionSelector(enum.Enum): LATEST_HIGHER = enum.auto() """Upgrade to the highest version that is higher than the current one.""" + +# pylint: disable=too-few-public-methods,inherit-non-class class Template(typing.NamedTuple): """Details of a template.""" name: str @@ -273,11 +275,14 @@ class Template(typing.NamedTuple): """Return a tuple of (EPOCH, VERSION, RELEASE)""" return self.epoch, self.version, self.release + class DlEntry(typing.NamedTuple): """Information about a template to be downloaded.""" evr: typing.Tuple[str, str, str] reponame: str dlsize: int +# pylint: enable=too-few-public-methods,inherit-non-class + def build_version_str(evr: typing.Tuple[str, str, str]) -> str: """Return version string described by ``evr``, which is in (epoch, version,