Skip to content

Commit cb9318c

Browse files
committed
Fix linter issues
1 parent 4d83f95 commit cb9318c

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

capi_janitor/openstack/openstack.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,8 @@ async def __aenter__(self):
193193
continue
194194

195195
for ep in entry["endpoints"]:
196-
if (
197-
ep.get("interface") == self._interface
198-
and (not self._region or ep.get("region_id") == self._region)
196+
if ep.get("interface") == self._interface and (
197+
not self._region or ep.get("region_id") == self._region
199198
):
200199
self._endpoints[entry["type"]] = ep["url"]
201200
break

capi_janitor/tests/openstack/test_openstack.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22
from unittest.mock import AsyncMock, MagicMock, patch
3-
from capi_janitor.openstack.openstack import Cloud, Client, AuthenticationError
3+
from capi_janitor.openstack.openstack import Cloud, AuthenticationError
44

55

66
class TestCloudAenter(unittest.IsolatedAsyncioTestCase):
@@ -116,14 +116,7 @@ async def test_aenter_empty_endpoint_list(self, mock_client):
116116
mock_client_instance = AsyncMock()
117117
mock_client.return_value = mock_client_instance
118118
mock_client_instance.get.return_value.json = MagicMock(
119-
return_value={
120-
"catalog": [
121-
{
122-
"type": "compute",
123-
"endpoints": []
124-
}
125-
]
126-
}
119+
return_value={"catalog": [{"type": "compute", "endpoints": []}]}
127120
)
128121

129122
async with self.cloud as cloud:

0 commit comments

Comments
 (0)