Skip to content

Commit d856bad

Browse files
committed
chore(azure): fix random mypy complaints that cropped up out of nowhere
1 parent ffd6fa9 commit d856bad

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pycloudlib/azure/instance.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def add_network_interface(self, **kwargs) -> str:
259259
default_nic = [nic for nic in all_nics if nic.id == default_nic_id]
260260
if len(default_nic) == 0:
261261
raise PycloudlibError("Could not get the first/default NIC")
262-
default_nic = default_nic[0]
262+
default_nic = default_nic[0] # type: ignore
263263
subnet_id = default_nic.ip_configurations[0].subnet.id # type: ignore
264264
nsg_id = default_nic.network_security_group.id # type: ignore
265265

@@ -280,7 +280,7 @@ def add_network_interface(self, **kwargs) -> str:
280280
"tags": None,
281281
}
282282
nic_name = f"{self.name}-nic-{us}"
283-
nic_poller = self._network_client.network_interfaces.begin_create_or_update(
283+
nic_poller = self._network_client.network_interfaces.begin_create_or_update( # type: ignore
284284
self._instance["rg_name"], nic_name, default_config
285285
)
286286
created_nic = nic_poller.result()
@@ -324,7 +324,8 @@ def remove_network_interface(self, ip_address: str):
324324
self._remove_nic_from_vm(nic_params, primary_nic)
325325
# delete the removed NIC
326326
self._network_client.network_interfaces.begin_delete(
327-
self._instance["rg_name"], nic_to_remove.name
327+
self._instance["rg_name"],
328+
nic_to_remove.name, # type: ignore
328329
)
329330

330331
def _remove_nic_from_vm(

0 commit comments

Comments
 (0)