Skip to content

Fix List item_type validation rejecting subclasses with a custom metaclass - #1166

Open
maximlt wants to merge 2 commits into
mainfrom
list_is_instance_fix
Open

Fix List item_type validation rejecting subclasses with a custom metaclass#1166
maximlt wants to merge 2 commits into
mainfrom
list_is_instance_fix

Conversation

@maximlt

@maximlt maximlt commented Aug 11, 2026

Copy link
Copy Markdown
Member

_validate_item_type used type(v) is not type to check that an item is a class. This strict identity check only holds for classes whose metaclass is
exactly type, so valid subclasses defined with a custom metaclass were wrongly rejected. Use isinstance(v, type) instead.

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.73%. Comparing base (bd43b28) to head (d6ad90c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1166   +/-   ##
=======================================
  Coverage   86.73%   86.73%           
=======================================
  Files           9        9           
  Lines        5321     5321           
=======================================
  Hits         4615     4615           
  Misses        706      706           

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

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.

2 participants