Skip to content

Commit

Permalink
fix(lint): use-dict-literal
Browse files Browse the repository at this point in the history
  • Loading branch information
itayB committed Dec 19, 2023
1 parent 844876f commit d29cebc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions serversion/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _get_token(self):
token_path = f"{self.service_account_path}/token"
token = None
try:
with open(token_path, 'r') as opened_file:
with open(token_path, encoding="utf-8") as opened_file:
token = opened_file.read()
except FileNotFoundError:
# TODO: switch print to logger
Expand Down Expand Up @@ -91,7 +91,7 @@ def _get_versioned_images(cls, pod_info):
}

async def get_images_with_tags(self, namespaces):
images_with_tags = dict()
images_with_tags = {}
if self.headers is None:
self._set_headers()
# TODO: in parallel
Expand All @@ -109,7 +109,7 @@ async def get_images_with_tags(self, namespaces):
return images_with_tags

async def get_helm_data(self):
helm_data = dict()
helm_data = {}
async with ClientSession() as session:
response = await session.get(
f"{self.api_server}/api/v1/secrets",
Expand All @@ -127,7 +127,7 @@ async def get_helm_data(self):
namespace: str = chart_data.get("namespace")
name = metadata.get("name")
if helm_data.get(namespace) is None:
helm_data[namespace] = dict()
helm_data[namespace] = {}
helm_data[namespace][name] = {
"version": metadata.get("version"),
"appVersion": metadata.get("appVersion"),
Expand Down

0 comments on commit d29cebc

Please sign in to comment.