1
Fork 0
mirror of https://github.com/RGBCube/GitHubWrapper synced 2025-05-18 06:55:09 +00:00

Fix all params appearing as NotRequired[...]

This commit is contained in:
RGBCube 2022-06-26 17:25:36 +03:00
parent 9e97298f7c
commit 132f42cf28
2 changed files with 119 additions and 118 deletions

View file

@ -126,7 +126,8 @@ def generate_typed_dicts_from_json_schema(
value, title=key.capitalize(), no_comments=no_comments
)
result.append(extras)
if param_annotation not in obj.get("required", []):
if key not in obj.get("required", []):
param_annotation = f"NotRequired[{param_annotation}]"
if not no_comments: