Skip to content

Commit 7de1d6c

Browse files
authored
Merge pull request #4820 from opsmill/pog-infrastructure-edge-pep-484
Fix PEP 484 violations for infrastructure_edge.py
2 parents 58fc689 + 449bd87 commit 7de1d6c

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
@@ -87,11 +87,11 @@ def __set_config(self, num_sites: int, num_device_per_site: int, has_bgp_mesh: b
8787

8888
def load_config(
8989
self,
90-
profile: str = None,
91-
num_sites: int = None,
92-
num_device_per_site: int = None,
93-
has_bgp_mesh: bool = None,
94-
has_branch: bool = None,
90+
profile: str | None = None,
91+
num_sites: int | None = None,
92+
num_device_per_site: int | None = None,
93+
has_bgp_mesh: bool | None = None,
94+
has_branch: bool | None = None,
9595
) -> None:
9696
if profile:
9797
# Warn user that we are going to ignore his input
@@ -2077,11 +2077,11 @@ async def run(
20772077
client: InfrahubClient,
20782078
log: logging.Logger,
20792079
branch: str,
2080-
profile: str = None,
2081-
num_sites: int = None,
2082-
num_device_per_site: int = None,
2083-
has_bgp_mesh: str = None,
2084-
has_branch: str = None,
2080+
profile: str | None = None,
2081+
num_sites: int | None = None,
2082+
num_device_per_site: int | None = None,
2083+
has_bgp_mesh: str | None = None,
2084+
has_branch: str | None = None,
20852085
) -> None:
20862086
# Create timer to keep track of time elapsed
20872087
start: float = time.time()
@@ -2093,11 +2093,11 @@ async def run(
20932093
config = GlobalConfig()
20942094

20952095
# Translate str to bool
2096-
bool_has_bgp_mesh: bool = None
2096+
bool_has_bgp_mesh: bool | None = None
20972097
if has_bgp_mesh is not None:
20982098
bool_has_bgp_mesh = translate_str_to_bool("has_bgp_mesh", has_bgp_mesh)
20992099

2100-
bool_has_branch: bool = None
2100+
bool_has_branch: bool | None = None
21012101
if has_branch is not None:
21022102
bool_has_branch = translate_str_to_bool("has_branch", has_branch)
21032103

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)