diff options
author | James Falcon <james.falcon@canonical.com> | 2021-12-15 20:16:38 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-15 19:16:38 -0700 |
commit | bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf (patch) | |
tree | 1fbb3269fc87e39832e3286ef42eefd2b23fcd44 /cloudinit/event.py | |
parent | 2bcf4fa972fde686c2e3141c58e640640b44dd00 (diff) | |
download | vyos-cloud-init-bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf.tar.gz vyos-cloud-init-bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf.zip |
Adopt Black and isort (SC-700) (#1157)
Applied Black and isort, fixed any linting issues, updated tox.ini
and CI.
Diffstat (limited to 'cloudinit/event.py')
-rw-r--r-- | cloudinit/event.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cloudinit/event.py b/cloudinit/event.py index 53ad4c25..eaf8bd0b 100644 --- a/cloudinit/event.py +++ b/cloudinit/event.py @@ -13,7 +13,7 @@ class EventScope(Enum): # NETWORK is currently the only scope, but we want to leave room to # grow other scopes (e.g., STORAGE) without having to make breaking # changes to the user config - NETWORK = 'network' + NETWORK = "network" def __str__(self): # pylint: disable=invalid-str-returned return self.value @@ -21,6 +21,7 @@ class EventScope(Enum): class EventType(Enum): """Event types which can generate maintenance requests for cloud-init.""" + # Cloud-init should grow support for the follow event types: # HOTPLUG # METADATA_CHANGE @@ -29,7 +30,7 @@ class EventType(Enum): BOOT = "boot" BOOT_NEW_INSTANCE = "boot-new-instance" BOOT_LEGACY = "boot-legacy" - HOTPLUG = 'hotplug' + HOTPLUG = "hotplug" def __str__(self): # pylint: disable=invalid-str-returned return self.value @@ -58,7 +59,7 @@ def userdata_to_events(user_config: dict) -> Dict[EventScope, Set[EventType]]: ) continue try: - new_values = [EventType(x) for x in scope_list['when']] + new_values = [EventType(x) for x in scope_list["when"]] except ValueError as e: LOG.warning( "%s! Update data will be ignored for '%s' scope", @@ -70,4 +71,5 @@ def userdata_to_events(user_config: dict) -> Dict[EventScope, Set[EventType]]: return update_config + # vi: ts=4 expandtab |