Skip to content
Snippets Groups Projects
Verified Commit 17076de5 authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

Use tighter ignore statements

parent de21187d
No related branches found
No related tags found
1 merge request!377Update dependencies
......@@ -3,7 +3,7 @@
import asyncio
from azure.identity.aio import CertificateCredential
from msgraph import GraphServiceClient
from msgraph import GraphServiceClient # type: ignore[attr-defined]
from msgraph.generated.models.field_value_set import FieldValueSet
from msgraph.generated.models.list_item import ListItem
from msgraph.generated.models.list_item_collection_response import ListItemCollectionResponse
......@@ -77,6 +77,6 @@ class SharePointClient:
)
# Strip the last part of the URL, since we want the link to the list, not the list item.
return new_item.web_url.rsplit("/", 1)[0]
return new_item.web_url.rsplit("/", 1)[0] # type: ignore[union-attr]
return asyncio.run(_new_list_item())
......@@ -52,11 +52,11 @@ def initial_input_generator(product_name: str) -> FormGenerator:
def _vlan_range_field(*, is_vlan: bool) -> VLAN_ID:
"""Return the appropriate field type based on whether the circuit is VLAN."""
return VLAN_ID if is_vlan else ReadOnlyField(None, default_type=int)
return VLAN_ID if is_vlan else ReadOnlyField(None, default_type=int) # type: ignore[return-value]
def _policer_field(*, policer_enabled: bool) -> BandwidthString:
"""Return the appropriate field type based on whether the policer is enabled."""
return BandwidthString if policer_enabled else ReadOnlyField(None, default_type=str)
return BandwidthString if policer_enabled else ReadOnlyField(None, default_type=str) # type: ignore[return-value]
class Layer2CircuitServiceSidesPage(SubmitFormPage):
model_config = ConfigDict(title=f"{product_name} - Configure Edge Ports")
......
......@@ -79,12 +79,12 @@ def initial_input_form_generator(product_name: str) -> FormGenerator:
add_v4_multicast: bool = Field(default=False, exclude=True)
send_default_route: bool = False
@computed_field # type: ignore[misc]
@computed_field # type: ignore[prop-decorator]
@property
def families(self) -> list[IPFamily]:
return [IPFamily.V4UNICAST, IPFamily.V4MULTICAST] if self.add_v4_multicast else [IPFamily.V4UNICAST]
@computed_field # type: ignore[misc]
@computed_field # type: ignore[prop-decorator]
@property
def ip_type(self) -> IPTypes:
return IPTypes.IPV4
......@@ -100,12 +100,12 @@ def initial_input_form_generator(product_name: str) -> FormGenerator:
add_v6_multicast: bool = Field(default=False, exclude=True)
send_default_route: bool = False
@computed_field # type: ignore[misc]
@computed_field # type: ignore[prop-decorator]
@property
def families(self) -> list[IPFamily]:
return [IPFamily.V6UNICAST, IPFamily.V6MULTICAST] if self.add_v6_multicast else [IPFamily.V6UNICAST]
@computed_field # type: ignore[misc]
@computed_field # type: ignore[prop-decorator]
@property
def ip_type(self) -> IPTypes:
return IPTypes.IPV6
......
......@@ -75,12 +75,12 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator:
add_v4_multicast: bool = Field(default=False, exclude=True)
send_default_route: bool = False
@computed_field # type: ignore[misc]
@computed_field # type: ignore[prop-decorator]
@property
def families(self) -> list[IPFamily]:
return [IPFamily.V4UNICAST, IPFamily.V4MULTICAST] if self.add_v4_multicast else [IPFamily.V4UNICAST]
@computed_field # type: ignore[misc]
@computed_field # type: ignore[prop-decorator]
@property
def ip_type(self) -> IPTypes:
return IPTypes.IPV4
......@@ -96,12 +96,12 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator:
add_v6_multicast: bool = Field(default=False, exclude=True)
send_default_route: bool = False
@computed_field # type: ignore[misc]
@computed_field # type: ignore[prop-decorator]
@property
def families(self) -> list[IPFamily]:
return [IPFamily.V6UNICAST, IPFamily.V6MULTICAST] if self.add_v6_multicast else [IPFamily.V6UNICAST]
@computed_field # type: ignore[misc]
@computed_field # type: ignore[prop-decorator]
@property
def ip_type(self) -> IPTypes:
return IPTypes.IPV6
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment