Skip to content

Commit

Permalink
qvm-template: mute pylint complains about typing.NamedTuple
Browse files Browse the repository at this point in the history
This is false positive, pylint-dev/pylint#3732
  • Loading branch information
marmarek committed Feb 19, 2021
1 parent b86408a commit 5c6ea1c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions qubesadmin/tools/qvm_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -273,11 +275,14 @@ def evr(self):
"""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,
Expand Down

0 comments on commit 5c6ea1c

Please sign in to comment.