Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update stubs for netbox 3.7 #8

Merged
merged 4 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,16 @@ def from_definition(
elif "items" in defi and "$ref" in defi["items"]:
assert "$ref" in defi["items"], f"{defi=}"
ref = defi["items"]["$ref"]
elif "type" in defi:
ref = ""
else:
assert False, f"{name=} {defi=}"
ref = ""
return cls(
name,
required,
PythonType.from_json(defi["type"]) if "type" in defi else None,
(
PythonType.from_json(defi["type"])
if "type" in defi
else PythonType.any
),
ref,
)

Expand Down
73 changes: 73 additions & 0 deletions pynetbox-stubs/_gen/circuits.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,17 @@ class Circuit_typesEndpoint(Endpoint):
def get(
self,
id: Optional[int] = None,
color: Optional[str] = None,
color__empty: Optional[bool] = None,
color__ic: Optional[str] = None,
color__ie: Optional[str] = None,
color__iew: Optional[str] = None,
color__isw: Optional[str] = None,
color__n: Optional[str] = None,
color__nic: Optional[str] = None,
color__nie: Optional[str] = None,
color__niew: Optional[str] = None,
color__nisw: Optional[str] = None,
created: Optional[str] = None,
created__empty: Optional[str] = None,
created__gt: Optional[str] = None,
Expand Down Expand Up @@ -367,6 +378,17 @@ class Circuit_typesEndpoint(Endpoint):
def filter(
self,
id: Optional[int] = None,
color: Optional[str] = None,
color__empty: Optional[bool] = None,
color__ic: Optional[str] = None,
color__ie: Optional[str] = None,
color__iew: Optional[str] = None,
color__isw: Optional[str] = None,
color__n: Optional[str] = None,
color__nic: Optional[str] = None,
color__nie: Optional[str] = None,
color__niew: Optional[str] = None,
color__nisw: Optional[str] = None,
created: Optional[str] = None,
created__empty: Optional[str] = None,
created__gt: Optional[str] = None,
Expand Down Expand Up @@ -438,6 +460,7 @@ class Circuit_typesEndpoint(Endpoint):
self,
name: str,
slug: str,
color: Optional[str] = None,
description: Optional[str] = None,
tags: Optional[List[Any]] = None,
custom_fields: Optional[Any] = None,
Expand All @@ -453,6 +476,17 @@ class Circuit_typesEndpoint(Endpoint):
def count(
self,
id: Optional[int] = None,
color: Optional[str] = None,
color__empty: Optional[bool] = None,
color__ic: Optional[str] = None,
color__ie: Optional[str] = None,
color__iew: Optional[str] = None,
color__isw: Optional[str] = None,
color__n: Optional[str] = None,
color__nic: Optional[str] = None,
color__nie: Optional[str] = None,
color__niew: Optional[str] = None,
color__nisw: Optional[str] = None,
created: Optional[str] = None,
created__empty: Optional[str] = None,
created__gt: Optional[str] = None,
Expand Down Expand Up @@ -1386,6 +1420,8 @@ class ProvidersEndpoint(Endpoint):
def get(
self,
id: Optional[int] = None,
asn: Optional[int] = None,
asn__n: Optional[int] = None,
asn_id: Optional[int] = None,
asn_id__n: Optional[int] = None,
contact: Optional[int] = None,
Expand All @@ -1402,6 +1438,17 @@ class ProvidersEndpoint(Endpoint):
created__lte: Optional[str] = None,
created__n: Optional[str] = None,
created_by_request: Optional[str] = None,
description: Optional[str] = None,
description__empty: Optional[bool] = None,
description__ic: Optional[str] = None,
description__ie: Optional[str] = None,
description__iew: Optional[str] = None,
description__isw: Optional[str] = None,
description__n: Optional[str] = None,
description__nic: Optional[str] = None,
description__nie: Optional[str] = None,
description__niew: Optional[str] = None,
description__nisw: Optional[str] = None,
id__empty: Optional[bool] = None,
id__gt: Optional[int] = None,
id__gte: Optional[int] = None,
Expand Down Expand Up @@ -1462,6 +1509,8 @@ class ProvidersEndpoint(Endpoint):
def filter(
self,
id: Optional[int] = None,
asn: Optional[int] = None,
asn__n: Optional[int] = None,
asn_id: Optional[int] = None,
asn_id__n: Optional[int] = None,
contact: Optional[int] = None,
Expand All @@ -1478,6 +1527,17 @@ class ProvidersEndpoint(Endpoint):
created__lte: Optional[str] = None,
created__n: Optional[str] = None,
created_by_request: Optional[str] = None,
description: Optional[str] = None,
description__empty: Optional[bool] = None,
description__ic: Optional[str] = None,
description__ie: Optional[str] = None,
description__iew: Optional[str] = None,
description__isw: Optional[str] = None,
description__n: Optional[str] = None,
description__nic: Optional[str] = None,
description__nie: Optional[str] = None,
description__niew: Optional[str] = None,
description__nisw: Optional[str] = None,
id__empty: Optional[bool] = None,
id__gt: Optional[int] = None,
id__gte: Optional[int] = None,
Expand Down Expand Up @@ -1560,6 +1620,8 @@ class ProvidersEndpoint(Endpoint):
def count(
self,
id: Optional[int] = None,
asn: Optional[int] = None,
asn__n: Optional[int] = None,
asn_id: Optional[int] = None,
asn_id__n: Optional[int] = None,
contact: Optional[int] = None,
Expand All @@ -1576,6 +1638,17 @@ class ProvidersEndpoint(Endpoint):
created__lte: Optional[str] = None,
created__n: Optional[str] = None,
created_by_request: Optional[str] = None,
description: Optional[str] = None,
description__empty: Optional[bool] = None,
description__ic: Optional[str] = None,
description__ie: Optional[str] = None,
description__iew: Optional[str] = None,
description__isw: Optional[str] = None,
description__n: Optional[str] = None,
description__nic: Optional[str] = None,
description__nie: Optional[str] = None,
description__niew: Optional[str] = None,
description__nisw: Optional[str] = None,
id__empty: Optional[bool] = None,
id__gt: Optional[int] = None,
id__gte: Optional[int] = None,
Expand Down
36 changes: 35 additions & 1 deletion pynetbox-stubs/_gen/core.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,17 @@ class Data_sourcesEndpoint(Endpoint):
created__lte: Optional[str] = None,
created__n: Optional[str] = None,
created_by_request: Optional[str] = None,
description: Optional[str] = None,
description__empty: Optional[bool] = None,
description__ic: Optional[str] = None,
description__ie: Optional[str] = None,
description__iew: Optional[str] = None,
description__isw: Optional[str] = None,
description__n: Optional[str] = None,
description__nic: Optional[str] = None,
description__nie: Optional[str] = None,
description__niew: Optional[str] = None,
description__nisw: Optional[str] = None,
enabled: Optional[bool] = None,
id__empty: Optional[bool] = None,
id__gt: Optional[int] = None,
Expand Down Expand Up @@ -283,6 +294,17 @@ class Data_sourcesEndpoint(Endpoint):
created__lte: Optional[str] = None,
created__n: Optional[str] = None,
created_by_request: Optional[str] = None,
description: Optional[str] = None,
description__empty: Optional[bool] = None,
description__ic: Optional[str] = None,
description__ie: Optional[str] = None,
description__iew: Optional[str] = None,
description__isw: Optional[str] = None,
description__n: Optional[str] = None,
description__nic: Optional[str] = None,
description__nie: Optional[str] = None,
description__niew: Optional[str] = None,
description__nisw: Optional[str] = None,
enabled: Optional[bool] = None,
id__empty: Optional[bool] = None,
id__gt: Optional[int] = None,
Expand Down Expand Up @@ -328,13 +350,14 @@ class Data_sourcesEndpoint(Endpoint):
def create(
self,
name: str,
type: str,
source_url: str,
type: Optional[str] = None,
enabled: Optional[bool] = None,
description: Optional[str] = None,
comments: Optional[str] = None,
parameters: Optional[Any] = None,
ignore_rules: Optional[str] = None,
custom_fields: Optional[Any] = None,
) -> definitions.DataSource: ...
def create(
self, *args: Dict[str, Any], **kwargs: Any
Expand All @@ -355,6 +378,17 @@ class Data_sourcesEndpoint(Endpoint):
created__lte: Optional[str] = None,
created__n: Optional[str] = None,
created_by_request: Optional[str] = None,
description: Optional[str] = None,
description__empty: Optional[bool] = None,
description__ic: Optional[str] = None,
description__ie: Optional[str] = None,
description__iew: Optional[str] = None,
description__isw: Optional[str] = None,
description__n: Optional[str] = None,
description__nic: Optional[str] = None,
description__nie: Optional[str] = None,
description__niew: Optional[str] = None,
description__nisw: Optional[str] = None,
enabled: Optional[bool] = None,
id__empty: Optional[bool] = None,
id__gt: Optional[int] = None,
Expand Down
Loading
Loading