Skip to content

Commit 1b020a4

Browse files
authored
✏️ rename missing type alias
1 parent bc3b47e commit 1b020a4

33 files changed

+6638
-6638
lines changed

codegen/parser/endpoints/endpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def get_imports(self) -> Set[str]:
6464
imports.update(self.request_body.get_param_imports())
6565
imports.update(self.request_body.get_using_imports())
6666
if self.request_body.allowed_models:
67-
imports.add("from githubkit.utils import UNSET, MISSING")
67+
imports.add("from githubkit.utils import UNSET, Missing")
6868
if self.success_response:
6969
imports.update(self.success_response.get_using_imports())
7070
for resp in self.error_responses.values():

codegen/parser/schemas/schema.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@ class Property(BaseModel):
5656
def get_type_string(self) -> str:
5757
"""Get schema typing string in any place"""
5858
type_string = self.schema_data.get_type_string()
59-
return type_string if self.required else f"MISSING[{type_string}]"
59+
return type_string if self.required else f"Missing[{type_string}]"
6060

6161
def get_param_type_string(self) -> str:
6262
"""Get type string used by client codegen"""
6363
type_string = self.schema_data.get_param_type_string()
64-
return type_string if self.required else f"MISSING[{type_string}]"
64+
return type_string if self.required else f"Missing[{type_string}]"
6565

6666
def get_model_imports(self) -> Set[str]:
6767
"""Get schema needed imports for model codegen"""
6868
imports = self.schema_data.get_model_imports()
6969
imports.add("from pydantic import Field")
7070
if not self.required:
71-
imports.add("from githubkit.utils import UNSET, MISSING")
71+
imports.add("from githubkit.utils import UNSET, Missing")
7272
return imports
7373

7474
def get_type_imports(self) -> Set[str]:
@@ -82,7 +82,7 @@ def get_param_imports(self) -> Set[str]:
8282
"""Get schema needed imports for typing params"""
8383
imports = self.schema_data.get_param_imports()
8484
if not self.required:
85-
imports.add("from githubkit.utils import UNSET, MISSING")
85+
imports.add("from githubkit.utils import UNSET, Missing")
8686
return imports
8787

8888
def _get_default_string(self) -> str:

0 commit comments

Comments
 (0)