Skip to content

Lint - #168

Merged
bckohan merged 3 commits into
mainfrom
lint
Aug 3, 2026
Merged

Lint#168
bckohan merged 3 commits into
mainfrom
lint

Conversation

@bckohan

@bckohan bckohan commented Aug 3, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings August 3, 2026 16:33

Copilot AI left a comment

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.

🟡 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 TypeError and 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.

Comment thread tests/legacy/test.py Resolved
Comment thread tests/annotations/test.py Resolved
Comment on lines 614 to 619
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
Comment thread src/enum_properties/__init__.pyi Resolved
@codecov-commenter

codecov-commenter commented Aug 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f185b9f) to head (8a3845f).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI review requested due to automatic review settings August 3, 2026 17:43

Copilot AI left a comment

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.

🟢 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.

@bckohan
bckohan merged commit b136b55 into main Aug 3, 2026
26 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.

3 participants