Skip to content

Make Set trait generic - #986

Open
GruffElixir wants to merge 2 commits into
ipython:mainfrom
GruffElixir:fix/generic-set-type
Open

Make Set trait generic#986
GruffElixir wants to merge 2 commits into
ipython:mainfrom
GruffElixir:fix/generic-set-type

Conversation

@GruffElixir

Copy link
Copy Markdown

Fixes #927

Make Set preserve its element type parameter, matching List and the other container traits. This enables annotations such as values: Set[str] = Set() to expose Set[str] on the class and set[str] on instances.

Tests: python -m pytest tests/test_typing.py -q

Copilot AI lite review requested due to automatic review settings September 8, 2026 12:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.21%. Comparing base (c4f1247) to head (b16490a).

Components Coverage Δ
traitlets 85.63% <100.00%> (+<0.01%) ⬆️
tests 99.07% <ø> (ø)

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

@GruffElixir

GruffElixir commented Sep 8, 2026

Copy link
Copy Markdown
Author

The project tests, lint, Codecov, and downstream ipython/ipywidgets/nbconvert/notebook checks are passing. The two remaining failures appear external or transient: Read the Docs stopped during checkout with "fatal: reference is not a tree: b16490a", and the jupyter_server downstream job had one kernel-cull timing failure after 1,153 passes. Could a maintainer rerun those checks when convenient?

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.

traitlets.Set should support generic type annotations for type safety

2 participants