Skip to content

Conversation

@dlqqq
Copy link
Collaborator

@dlqqq dlqqq commented Jun 27, 2025

Description

  • Fixes all mypy errors under jupyter_server_documents/rooms.
  • Adds mypy CI workflow (only checks rooms/ only for now).
  • Prevents issues like Fix typo in YRoom #132 from happening again.

@dlqqq dlqqq changed the title Add mypy type checking for rooms module Add mypy type checking for rooms/ module Jun 27, 2025
Copy link
Collaborator

@Zsailer Zsailer left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks @dlqqq.

Left a minor comment about removing the types from some traits, but not a blocker for merging.

out-of-band. See #116.
"""

_inactive_rooms: set[str] = traitlets.Set()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unfortunately this isn't possible. set != traitlets.Set according to mypy, and traitlets.Set does not accept a generic argument, so all of its values have type Any by default. For now, I've just added a comment documenting that all values in this set should be strings.

@Zsailer Zsailer merged commit 90894f6 into jupyter-ai-contrib:main Jun 27, 2025
8 of 10 checks passed
@dlqqq
Copy link
Collaborator Author

dlqqq commented Jun 27, 2025

Opened a new upstream issue regarding traitlets.Set: ipython/traitlets#927

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants