Skip to content

2026 02 typing#110

Open
inducer wants to merge 2 commits intomainfrom
2026-02-typing
Open

2026 02 typing#110
inducer wants to merge 2 commits intomainfrom
2026-02-typing

Conversation

@inducer
Copy link
Owner

@inducer inducer commented Feb 8, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 8, 2026 20:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves type information in boxtree by adding explicit ClassVar/generic typing annotations to better support static type checking without changing runtime behavior.

Changes:

  • Annotate box_flags_enum constants and metadata as ClassVar fields.
  • Make dataclass_array_container preserve the decorated class type via TypeVar generics.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
boxtree/tree.py Adds ClassVar annotations to box flag constants/metadata to improve typing clarity.
boxtree/array_context.py Updates dataclass_array_container to be generically typed (type[T] -> type[T]).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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