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 24, 2023
1 parent 844876f commit caa508e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
with:
python-version: 3.8
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
bandit>=1.7.0
flake8>=3.8.4
mypy>=0.790
pytest>=6.2.1
pytest>=7.4.3
pytest-cov>=2.11.1
pylint>=2.6.0
pytest-aiohttp>=0.3.0
Expand Down
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 caa508e

Please sign in to comment.