Skip to content

Commit 6e82bba

Browse files
authored
Merge pull request #237 from opsmill/pog-PYI061
Replace `Literal[None]` with `None`
2 parents e47a240 + df5cff6 commit 6e82bba

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

infrahub_sdk/client.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ async def allocate_next_ip_address(
11861186
async def allocate_next_ip_address(
11871187
self,
11881188
resource_pool: CoreNode,
1189-
kind: Literal[None] = ...,
1189+
kind: None = ...,
11901190
identifier: str | None = ...,
11911191
prefix_length: int | None = ...,
11921192
address_type: str | None = ...,
@@ -1201,7 +1201,7 @@ async def allocate_next_ip_address(
12011201
async def allocate_next_ip_address(
12021202
self,
12031203
resource_pool: CoreNode,
1204-
kind: Literal[None] = ...,
1204+
kind: None = ...,
12051205
identifier: str | None = ...,
12061206
prefix_length: int | None = ...,
12071207
address_type: str | None = ...,
@@ -1216,7 +1216,7 @@ async def allocate_next_ip_address(
12161216
async def allocate_next_ip_address(
12171217
self,
12181218
resource_pool: CoreNode,
1219-
kind: Literal[None] = ...,
1219+
kind: None = ...,
12201220
identifier: str | None = ...,
12211221
prefix_length: int | None = ...,
12221222
address_type: str | None = ...,
@@ -1333,7 +1333,7 @@ async def allocate_next_ip_prefix(
13331333
async def allocate_next_ip_prefix(
13341334
self,
13351335
resource_pool: CoreNode,
1336-
kind: Literal[None] = ...,
1336+
kind: None = ...,
13371337
identifier: str | None = ...,
13381338
prefix_length: int | None = ...,
13391339
member_type: str | None = ...,
@@ -1349,7 +1349,7 @@ async def allocate_next_ip_prefix(
13491349
async def allocate_next_ip_prefix(
13501350
self,
13511351
resource_pool: CoreNode,
1352-
kind: Literal[None] = ...,
1352+
kind: None = ...,
13531353
identifier: str | None = ...,
13541354
prefix_length: int | None = ...,
13551355
member_type: str | None = ...,
@@ -1365,7 +1365,7 @@ async def allocate_next_ip_prefix(
13651365
async def allocate_next_ip_prefix(
13661366
self,
13671367
resource_pool: CoreNode,
1368-
kind: Literal[None] = ...,
1368+
kind: None = ...,
13691369
identifier: str | None = ...,
13701370
prefix_length: int | None = ...,
13711371
member_type: str | None = ...,
@@ -2306,7 +2306,7 @@ def allocate_next_ip_address(
23062306
def allocate_next_ip_address(
23072307
self,
23082308
resource_pool: CoreNodeSync,
2309-
kind: Literal[None] = ...,
2309+
kind: None = ...,
23102310
identifier: str | None = ...,
23112311
prefix_length: int | None = ...,
23122312
address_type: str | None = ...,
@@ -2321,7 +2321,7 @@ def allocate_next_ip_address(
23212321
def allocate_next_ip_address(
23222322
self,
23232323
resource_pool: CoreNodeSync,
2324-
kind: Literal[None] = ...,
2324+
kind: None = ...,
23252325
identifier: str | None = ...,
23262326
prefix_length: int | None = ...,
23272327
address_type: str | None = ...,
@@ -2336,7 +2336,7 @@ def allocate_next_ip_address(
23362336
def allocate_next_ip_address(
23372337
self,
23382338
resource_pool: CoreNodeSync,
2339-
kind: Literal[None] = ...,
2339+
kind: None = ...,
23402340
identifier: str | None = ...,
23412341
prefix_length: int | None = ...,
23422342
address_type: str | None = ...,
@@ -2449,7 +2449,7 @@ def allocate_next_ip_prefix(
24492449
def allocate_next_ip_prefix(
24502450
self,
24512451
resource_pool: CoreNodeSync,
2452-
kind: Literal[None] = ...,
2452+
kind: None = ...,
24532453
identifier: str | None = ...,
24542454
prefix_length: int | None = ...,
24552455
member_type: str | None = ...,
@@ -2465,7 +2465,7 @@ def allocate_next_ip_prefix(
24652465
def allocate_next_ip_prefix(
24662466
self,
24672467
resource_pool: CoreNodeSync,
2468-
kind: Literal[None] = ...,
2468+
kind: None = ...,
24692469
identifier: str | None = ...,
24702470
prefix_length: int | None = ...,
24712471
member_type: str | None = ...,
@@ -2481,7 +2481,7 @@ def allocate_next_ip_prefix(
24812481
def allocate_next_ip_prefix(
24822482
self,
24832483
resource_pool: CoreNodeSync,
2484-
kind: Literal[None] = ...,
2484+
kind: None = ...,
24852485
identifier: str | None = ...,
24862486
prefix_length: int | None = ...,
24872487
member_type: str | None = ...,

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ ignore = [
254254
"PLW1641", # Object does not implement `__hash__` method
255255
"PTH100", # `os.path.abspath()` should be replaced by `Path.resolve()`
256256
"PTH109", # `os.getcwd()` should be replaced by `Path.cwd()`
257-
"PYI061", # [*] `Literal[None]` can be replaced with `None`
258257
"RET504", # Unnecessary assignment to `data` before `return` statement
259258
"RUF005", # Consider `[*path, str(key)]` instead of concatenation
260259
"RUF015", # Prefer `next(iter(input_data["variables"].keys()))` over single element slice

0 commit comments

Comments
 (0)