manchenkoff / openapi3-parser

OpenAPI 3 parser to use a specification inside of the code in your projects
https://pypi.org/project/openapi3-parser/
MIT License
65 stars 34 forks source link

Use slots in the dataclasses to optimize performance #30

Open manchenkoff opened 2 years ago

manchenkoff commented 2 years ago

Since dataclasses have only immutable structure and could not be extended with different fields, we should turn slots parameter on.

Example

from dataclasses import dataclasses

@dataclass(slots=True)
class Schema:
   ...