Skip to content

Commit

Permalink
fix;
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuathompsonlindley committed Sep 20, 2023
1 parent a99988c commit b8a8ae9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/flask_openapi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DO NOT CHANGE MANUALLY THIS IS CHANGED IN THE PIPELINES
__version__ = "1.4.0"
__version__ = "2.0.0"

import flask_openapi.compat.marshmallow as marshmallow_shim # noqa
from flask_openapi.core import OpenAPI # noqa
Expand Down
2 changes: 1 addition & 1 deletion src/flask_openapi/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def update_schemas_parsers(self, doc, schemas, parsers, definitions) -> None:
)

# TODO support anyOf and oneOf in the future
if (json_schema is not None) and type(json_schema) == dict:
if (json_schema is not None) and isinstance(json_schema, dict):

schemas[location] = json_schema
self.set_schemas(schemas, location, definitions)
Expand Down
2 changes: 1 addition & 1 deletion src/flask_openapi/openapi/specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def get_operations(
else:
update_schemas = swag.get("definitions", {})

if type(update_schemas) == list and type(update_schemas[0]) == dict:
if isinstance(update_schemas, list) and isinstance(update_schemas[0], dict):
(update_schemas,) = update_schemas

definitions.update(update_schemas)
Expand Down
2 changes: 1 addition & 1 deletion src/flask_openapi/utils/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ def __ge__(self, other):

@property
def text_type(self) -> Type[str]:
return text_type
return text_type

0 comments on commit b8a8ae9

Please sign in to comment.