Skip to content

Commit

Permalink
🔥 remove unused codes
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu committed Dec 27, 2023
1 parent 7e4d5e9 commit 52f1327
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions codegen/parser/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ class ResponseData:
description: str
response_schema: SchemaData | None = None

# def get_using_imports(self) -> set[str]:
# return (
# self.response_schema.get_using_imports() if self.response_schema else set()
# )


@dataclass(kw_only=True)
class EndpointData:
Expand Down Expand Up @@ -127,44 +122,13 @@ def cookie_params(self) -> list[Parameter]:
def param_names(self) -> list[str]:
return [param.prop_name for param in self.parameters]

# def get_imports(self) -> set[str]:
# imports = set()
# for param in self.parameters:
# imports.update(param.get_param_imports())
# if self.request_body:
# imports.update(self.request_body.get_param_imports())
# imports.update(self.request_body.get_using_imports())
# if self.request_body.allowed_models:
# imports.add("from githubkit.utils import UNSET, Missing")
# if self.success_response:
# imports.update(self.success_response.get_using_imports())
# for resp in self.error_responses.values():
# imports.update(resp.get_using_imports())
# return imports


@dataclass
class WebhookData:
event: str
action: str | None
event_schema: SchemaData

# @cached_property
# def model_definitions(self) -> dict[str, SchemaData]:
# return {
# name: schema
# for name, schema in self.definitions.items()
# if isinstance(schema, SchemaData)
# }

# @cached_property
# def union_definitions(self) -> dict[str, dict[str, SchemaData]]:
# return {
# name: schema
# for name, schema in self.definitions.items()
# if isinstance(schema, dict)
# }


@dataclass
class OpenAPIData:
Expand Down

0 comments on commit 52f1327

Please sign in to comment.