Skip to content

Commit

Permalink
Merge pull request #3 from Nikikuzi/str-to-enum-inheritance
Browse files Browse the repository at this point in the history
Added inheritance from `str` to `Enum`-inherited classes
  • Loading branch information
Nikikuzi authored Oct 21, 2024
2 parents 854b2b8 + ade7112 commit d05c5f6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
8 changes: 8 additions & 0 deletions RELEASE_NOTES.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# graphql-dataclass Release Update

## Release notes version: 1.0.6

Release date: Oct. 21, 2024

Changes

* Added inheritance from `str` to `Enum`-inherited classes. Before - `class Status(Enum):` now - `class Status(str, Enum):`. It is enhancing dataclass to dict formatting for json

## Release notes version: 1.0.5

Release date: Oct. 7, 2024
Expand Down
2 changes: 1 addition & 1 deletion codegen/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ def extract_schema_obj(arguments, verbose):
return None

if __name__ == '__main__':
print('graphql-dataclass code generator 1.0.5')
print('graphql-dataclass code generator 1.0.6')
main()
2 changes: 1 addition & 1 deletion codegen/src/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
ARGUED_CLASS_SIGNATURE = "class %s(%s)"
QUERY_SIGNATURE = "class %s(GQLQuery)"
MUTATION_SIGNATURE = "class %s(GQLMutation)"
ENUM_SIGNATURE = "class %s(Enum)"
ENUM_SIGNATURE = "class %s(str, Enum)"
SCALAR_SIGNATURE = "%s = %s"
TYPEVAR_SIGNATURE = "%s = TypeVar('%s', bound=%s)"
EMPTY_CLASS_SIGNATURE = "class %s(%s): pass"
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ gqldataclass = "codegen.__main__:main"

[project.urls]
"Homepage" = "https://github.com/nikikuzi/graphql-dataclass/"
"Source Code" = "https://github.com/nikikuzi/graphql-dataclass/tree/1.0.5"
"Source Code" = "https://github.com/nikikuzi/graphql-dataclass/tree/1.0.6"
"Bug Tracker" = "https://github.com/nikikuzi/graphql-dataclass/issues"
"Release Notes" = "https://github.com/nikikuzi/graphql-dataclass/tree/1.0.5/RELEASE_NOTES.MD"
"Release Notes" = "https://github.com/nikikuzi/graphql-dataclass/tree/1.0.6/RELEASE_NOTES.MD"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='gqldataclass',
version='1.0.5',
version='1.0.6',
url='https://github.com/nikikuzi/graphql-dataclass',
author='Mikita Kuzniatsou, Alex Dap',
author_email='[email protected], [email protected]',
Expand Down

0 comments on commit d05c5f6

Please sign in to comment.