Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Not ready to approve
There are verified typing/API-shape issues (a mismatched attribute annotation in __init__.py and a missing __str__ in the Python<3.11 stub branch) that should be corrected before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR is a lint/typing-focused release bump to v2.8.0 that updates exception types thrown during enum class construction (ValueError → TypeError in certain “wrong type” scenarios), aligns tests accordingly, and adjusts typing/lint configuration.
Changes:
- Bump project/library version to 2.8.0 and document the change in the changelog.
- Change some enum-definition validation errors to raise
TypeErrorand update tests to expect it. - Apply ruff/typing cleanups (future annotations, typing tweaks, ruff exclude changes, justfile syntax update).
File summaries
| File | Description |
|---|---|
| tests/legacy/test.py | Updates expected exception type in tests for invalid symmetric definitions. |
| tests/annotations/test.py | Updates expected exception type in annotation-based symmetric property tests. |
| src/enum_properties/init.pyi | Stub typing adjustments (imports/signatures) related to lint/type correctness. |
| src/enum_properties/init.py | Core behavior change to raise TypeError in specific enum-definition validation paths + typing/lint cleanups. |
| pyproject.toml | Version bump and ruff configuration tweak (extend-exclude). |
| justfile | Updates just configuration syntax for unstable. |
| doc/source/changelog.rst | Adds v2.8.0 changelog entry describing behavior/lint changes. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 4
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
| class AnnotationPropertyRecorder(dict): | ||
| class_dict: "_PropertyEnumDict" | ||
| class_dict_: _PropertyEnumDict | ||
| create_properties: bool | ||
|
|
||
| def __init__(self, class_dict: "_PropertyEnumDict"): | ||
| def __init__(self, class_dict: _PropertyEnumDict): | ||
| self.class_dict = class_dict |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #168 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 390 414 +24
Branches 86 85 -1
=========================================
+ Hits 390 414 +24 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Ready to approve
The functional changes are consistent and tested, with only minor test docstring wording mismatches noted.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
Suppressed comments (2)
tests/legacy/test.py:62
- The docstring still says a "value error" is expected, but the test now correctly asserts TypeError. Update the docstring to match the behavior being tested (and use the exception name explicitly).
"""
Tests that a value error is thrown when an unhashable type is used as
a symmetric property
"""
with self.assertRaises(TypeError):
tests/annotations/test.py:23
- This docstring still refers to a "value error" even though the test now expects TypeError. Adjust the wording so the test description matches the asserted exception.
"""
Tests that a value error is thrown when an unhashable type is used as
a symmetric property
"""
with self.assertRaises(TypeError):
- Files reviewed: 7/7 changed files
- Comments generated: 0 new
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
No description provided.