summaryrefslogtreecommitdiff
path: root/cloudinit/net
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-03-30 22:16:32 -0400
committerGitHub <noreply@github.com>2020-03-30 20:16:32 -0600
commitee0377924aa6bcd072dc5836dbf8ac51110bd87d (patch)
treeb942323338d89c5347eeb2f3756e2863b368b9af /cloudinit/net
parente76057f46a0d09d6e5e8ac52b49759d23b18ff36 (diff)
downloadvyos-cloud-init-ee0377924aa6bcd072dc5836dbf8ac51110bd87d.tar.gz
vyos-cloud-init-ee0377924aa6bcd072dc5836dbf8ac51110bd87d.zip
net/cmdline: replace type comments with annotations (#294)
Diffstat (limited to 'cloudinit/net')
-rwxr-xr-xcloudinit/net/cmdline.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/cloudinit/net/cmdline.py b/cloudinit/net/cmdline.py
index 814ce411..0e83685d 100755
--- a/cloudinit/net/cmdline.py
+++ b/cloudinit/net/cmdline.py
@@ -27,14 +27,12 @@ class InitramfsNetworkConfigSource(metaclass=abc.ABCMeta):
"""ABC for net config sources that read config written by initramfses"""
@abc.abstractmethod
- def is_applicable(self):
- # type: () -> bool
+ def is_applicable(self) -> bool:
"""Is this initramfs config source applicable to the current system?"""
pass
@abc.abstractmethod
- def render_config(self):
- # type: () -> dict
+ def render_config(self) -> dict:
"""Render a v1 network config from the initramfs configuration"""
pass
@@ -65,8 +63,7 @@ class KlibcNetworkConfigSource(InitramfsNetworkConfigSource):
if mac_addr:
self._mac_addrs[k] = mac_addr
- def is_applicable(self):
- # type: () -> bool
+ def is_applicable(self) -> bool:
"""
Return whether this system has klibc initramfs network config or not
@@ -84,8 +81,7 @@ class KlibcNetworkConfigSource(InitramfsNetworkConfigSource):
return True
return False
- def render_config(self):
- # type: () -> dict
+ def render_config(self) -> dict:
return config_from_klibc_net_cfg(
files=self._files, mac_addrs=self._mac_addrs,
)