Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinMGranger committed Feb 8, 2022
1 parent 6175668 commit d37ba56
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion exporters/pelorus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ def load_kube_config():
config.load_kube_config()


def convert_date_time_to_timestamp(date_time, format_string="%Y-%m-%dT%H:%M:%SZ") -> float:
def convert_date_time_to_timestamp(
date_time, format_string="%Y-%m-%dT%H:%M:%SZ"
) -> float:
timestamp = None
try:
if isinstance(date_time, datetime):
Expand Down
6 changes: 4 additions & 2 deletions exporters/pelorus/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""
import dataclasses
from collections.abc import Iterable
from typing import Any, Protocol, TypeVar, Union, overload, Optional
from typing import Any, Optional, Protocol, TypeVar, Union, overload

__FIRST_NO_DEFAULT = object()
T = TypeVar("T")
Expand Down Expand Up @@ -46,7 +46,9 @@ class NameValueNamespace(Protocol[K, V]):
value: V


def name_value_attrs_to_dict(name_values: Iterable[NameValueNamespace[K, V]]) -> dict[K, V]:
def name_value_attrs_to_dict(
name_values: Iterable[NameValueNamespace[K, V]]
) -> dict[K, V]:
"""
Kubernetes commonly expresses mappings as a list of objects with two entries: `name` and `value`.
This converts those to a dict.
Expand Down

0 comments on commit d37ba56

Please sign in to comment.