qvm-template: mute pylint complains about typing.NamedTuple
This is false positive, PyCQA/pylint#3732
This commit is contained in:
parent
b86408a36d
commit
f4e826e65d
@ -254,6 +254,8 @@ class VersionSelector(enum.Enum):
|
|||||||
LATEST_HIGHER = enum.auto()
|
LATEST_HIGHER = enum.auto()
|
||||||
"""Upgrade to the highest version that is higher than the current one."""
|
"""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):
|
class Template(typing.NamedTuple):
|
||||||
"""Details of a template."""
|
"""Details of a template."""
|
||||||
name: str
|
name: str
|
||||||
@ -273,11 +275,14 @@ class Template(typing.NamedTuple):
|
|||||||
"""Return a tuple of (EPOCH, VERSION, RELEASE)"""
|
"""Return a tuple of (EPOCH, VERSION, RELEASE)"""
|
||||||
return self.epoch, self.version, self.release
|
return self.epoch, self.version, self.release
|
||||||
|
|
||||||
|
|
||||||
class DlEntry(typing.NamedTuple):
|
class DlEntry(typing.NamedTuple):
|
||||||
"""Information about a template to be downloaded."""
|
"""Information about a template to be downloaded."""
|
||||||
evr: typing.Tuple[str, str, str]
|
evr: typing.Tuple[str, str, str]
|
||||||
reponame: str
|
reponame: str
|
||||||
dlsize: int
|
dlsize: int
|
||||||
|
# pylint: enable=too-few-public-methods,inherit-non-class
|
||||||
|
|
||||||
|
|
||||||
def build_version_str(evr: typing.Tuple[str, str, str]) -> str:
|
def build_version_str(evr: typing.Tuple[str, str, str]) -> str:
|
||||||
"""Return version string described by ``evr``, which is in (epoch, version,
|
"""Return version string described by ``evr``, which is in (epoch, version,
|
||||||
|
Loading…
Reference in New Issue
Block a user