Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for Python Enum’s functional (dynamic) API to enum-properties, extending it with a properties= keyword so dynamic enums can define named per-member properties at creation time (closes #156).
Changes:
- Implement
EnumPropertiesMeta.__call__support forEnumProperties("Name", names, properties=(...))(and related mixins likeFlagProperties). - Add functional-API test coverage plus a runnable documentation example and how-to docs.
- Bump package version to
2.6.0and update changelog/lockfiles.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/enum_properties/__init__.py |
Adds metaclass __call__ implementation for functional API + version bump. |
src/enum_properties/__init__.pyi |
Minor stub cleanup (removes empty version-guard block). |
tests/test_functional.py |
New tests covering functional API behavior with/without properties and several branches. |
tests/examples/howto_functional.py |
New example module demonstrating functional API usage. |
tests/examples/test_examples.py |
Ensures the new example module imports cleanly. |
doc/source/howto.rst |
New documentation section explaining the functional API extension. |
doc/source/reference.rst |
Exposes __call__ in generated reference docs. |
doc/source/changelog.rst |
Adds a v2.6.0 changelog entry for functional API support. |
pyproject.toml |
Updates project version to 2.6.0. |
uv.lock |
Updates lock revision and enum-properties version. |
justfile |
Removes lock helper recipe and adjusts check recipe composition. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #157 +/- ##
==========================================
- Coverage 99.69% 99.22% -0.48%
==========================================
Files 1 1
Lines 331 385 +54
Branches 66 84 +18
==========================================
+ Hits 330 382 +52
- Misses 0 1 +1
- Partials 1 2 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
closes #156