Skip to content

Commit e739463

Browse files
committed
fix: use double quotes
1 parent e58527d commit e739463

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/osw/core.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ def fetch_schema(self, fetchSchemaParam: FetchSchemaParam = None) -> None:
339339
--use-schema-description \
340340
--use-field-description \
341341
--encoding utf-8 \
342+
--use-double-quotes \
342343
"
343344
)
344345
# see https://koxudaxi.github.io/datamodel-code-generator/
@@ -372,15 +373,17 @@ def fetch_schema(self, fetchSchemaParam: FetchSchemaParam = None) -> None:
372373
"if TYPE_CHECKING:\n"
373374
" from dataclasses import dataclass as _basemodel_decorator\n"
374375
"else:\n"
375-
" _basemodel_decorator = lambda x: x # noqa: E731\n"
376+
" _basemodel_decorator = lambda x: x # noqa: E731\n"
376377
"\n"
377378
)
378379
header += (
379-
"\nT = TypeVar('T', bound=BaseModel)\n"
380+
'\nT = TypeVar("T", bound=BaseModel)\n'
380381
"\nclass OswBaseModel(BaseModel):\n"
381382
" def full_dict(self, **kwargs): #extent BaseClass export function\n"
382383
" d = super().dict(**kwargs)\n"
383-
" for key in " + str(self._protected_keywords) + ":\n"
384+
" for key in "
385+
+ str(self._protected_keywords).replace("'", '"')
386+
+ ":\n"
384387
" if hasattr(self, key): d[key] = getattr(self, key) #include selected private properites. note: private properties are not considered as discriminator \n"
385388
" return d\n\n"
386389
" def cast(self, cls: Type[T]) -> T:\n"

0 commit comments

Comments
 (0)