Skip to content

Commit 449bd87

Browse files
committed
Fix PEP 484 violations for infrastructure_edge.py
1 parent 163b03d commit 449bd87

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

models/infrastructure_edge.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ def __set_config(self, num_sites: int, num_device_per_site: int, has_bgp_mesh: b
8383

8484
def load_config(
8585
self,
86-
profile: str = None,
87-
num_sites: int = None,
88-
num_device_per_site: int = None,
89-
has_bgp_mesh: bool = None,
90-
has_branch: bool = None,
86+
profile: str | None = None,
87+
num_sites: int | None = None,
88+
num_device_per_site: int | None = None,
89+
has_bgp_mesh: bool | None = None,
90+
has_branch: bool | None = None,
9191
) -> None:
9292
if profile:
9393
# Warn user that we are going to ignore his input
@@ -1901,11 +1901,11 @@ async def run(
19011901
client: InfrahubClient,
19021902
log: logging.Logger,
19031903
branch: str,
1904-
profile: str = None,
1905-
num_sites: int = None,
1906-
num_device_per_site: int = None,
1907-
has_bgp_mesh: str = None,
1908-
has_branch: str = None,
1904+
profile: str | None = None,
1905+
num_sites: int | None = None,
1906+
num_device_per_site: int | None = None,
1907+
has_bgp_mesh: str | None = None,
1908+
has_branch: str | None = None,
19091909
) -> None:
19101910
# Create timer to keep track of time elapsed
19111911
start: float = time.time()
@@ -1917,11 +1917,11 @@ async def run(
19171917
config = GlobalConfig()
19181918

19191919
# Translate str to bool
1920-
bool_has_bgp_mesh: bool = None
1920+
bool_has_bgp_mesh: bool | None = None
19211921
if has_bgp_mesh is not None:
19221922
bool_has_bgp_mesh = translate_str_to_bool("has_bgp_mesh", has_bgp_mesh)
19231923

1924-
bool_has_branch: bool = None
1924+
bool_has_branch: bool | None = None
19251925
if has_branch is not None:
19261926
bool_has_branch = translate_str_to_bool("has_branch", has_branch)
19271927

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,6 @@ allow-dunder-method-names = [
632632
##################################################################################################
633633
"C901", # `generate_site` is too complex (34 > 33)"
634634
"E501", # Line too long
635-
"RUF013", # PEP 484 prohibits implicit `Optional`
636635
]
637636

638637
"utilities/**.py" = [

0 commit comments

Comments
 (0)