Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.1.0 - Enum Extras #1

Merged
merged 1 commit into from
Apr 8, 2024
Merged

Version 1.1.0 - Enum Extras #1

merged 1 commit into from
Apr 8, 2024

Conversation

CCP-Zeulix
Copy link
Contributor

[1.1.0] - 2024-04-08

Added

  • a new enum_eval method that turns any reasonable value into an instance of the supplied Enum class (i.e. string names or ints or whatever).
  • a new enum base class, EnumEx that extends enum.Enum by adding a from_any class method that uses enum_eval to initialize a new instance of whatever class extends EnumEx from any sensible value
  • the new EnumEx class to the base ccptools.structs import

## [1.1.0] - 2024-04-08

### Added

- a new `enum_eval` method that turns any reasonable value into an instance
  of the supplied Enum class _(i.e. string names or ints or whatever)_.
- a new enum base class, `EnumEx` that extends `enum.Enum` by adding a
  `from_any` class method that uses `enum_eval` to initialize a new instance
  of whatever class extends `EnumEx` from any sensible value
- the new `EnumEx` class to the base `ccptools.structs` import
@CCP-Zeulix CCP-Zeulix self-assigned this Apr 8, 2024
@CCP-Zeulix CCP-Zeulix merged commit 8ce6e65 into main Apr 8, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant