Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Mar 18, 2019. It is now read-only.

Fix the encoding/decoding of Enum types.#126

Closed
tbeadle wants to merge 1 commit into
core-api:mastercore-api/python-client:masterfrom
tbeadle:enumtbeadle/python-client:enumCopy head branch name to clipboard
Closed

Fix the encoding/decoding of Enum types.#126
tbeadle wants to merge 1 commit into
core-api:mastercore-api/python-client:masterfrom
tbeadle:enumtbeadle/python-client:enumCopy head branch name to clipboard

Conversation

@tbeadle

@tbeadle tbeadle commented Apr 5, 2017

Copy link
Copy Markdown
Contributor

The 'enum' argument is a required parameter to creating an Enum. Store
it in an 'extra' dict that can be passed as **kwargs during its creation.

The 'enum' argument is a required parameter to creating an Enum.  Store
it in an 'extra' dict that can be passed as **kwargs during its creation.
'description': schema.description
}
if isinstance(schema, coreschema.Enum):
retval['extra'] = {'enum': schema.enum}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could just put this value directly under enum rather than having an extra dictionary.

Thanks for progressing this!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured that using 'extra' would allow it to be used for other types in the future.

@dkvdm dkvdm mentioned this pull request May 3, 2017
@dkvdm

dkvdm commented May 3, 2017

Copy link
Copy Markdown

Any news on this PR? @tomchristie, do you agree with @tbeadle's comment on the usage of the extra dictionary?

@lovelydinosaur

Copy link
Copy Markdown
Contributor

Closed via #135 (pycon sprints)

Thanks so much for kicking this off!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.