Conversation
Latest ty (0.0.33) flags two pre-existing diagnostics that older versions missed. Suppress them with targeted ignore comments since both reflect intentional dynamic patterns ty cannot model. - _tensorboard_logger.py: assigning _DummySummaryWriter to _RuntimeSummaryWriter conflicts with the declared type from the earlier import branches. The mypy ignore was already present; add a matching ty ignore. - hf_file_system.py: HfFileSystem uses a local _Cached metaclass that subclasses type(fsspec.AbstractFileSystem) at runtime, but ty cannot prove the subclass relationship statically. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
hanouticelina
approved these changes
Apr 28, 2026
Contributor
|
This PR has been shipped as part of the v1.13.0 release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Latest
tyrelease (0.0.33) flags two pre-existing diagnostics that older versions missed, breaking theuvx ty check srcstep in thepython-qualityCI workflow. Both reflect intentional dynamic patterns thattycannot model statically, so we suppress them with targeted ignore comments._tensorboard_logger.py:41: assigning_DummySummaryWriterto_RuntimeSummaryWriterconflicts with the declared type from the earliertensorboardX/torch.utils.tensorboardimport branches. The# type: ignore[assignment](mypy) was already there; added a matching# ty: ignore[conflicting-declarations].hf_file_system.py:140:HfFileSystemuses a local_Cachedmetaclass that subclassestype(fsspec.AbstractFileSystem)at runtime. The subclass relationship holds at runtime buttycan't prove it statically — added# ty: ignore[conflicting-metaclass].Before:
After:
🤖 Generated with Claude Code
Note
Low Risk
Low risk: only adds targeted
# ty: ignore[...]comments to silence new static type-checker diagnostics, with no runtime logic changes.Overview
Unblocks the
uvx ty check srcCI step by adding targetedtysuppression comments for two intentional dynamic patterns.Specifically, it annotates the
_DummySummaryWriterfallback assignment in_tensorboard_logger.pywith# ty: ignore[conflicting-declarations], and marksHfFileSystem’s use of the custom_Cachedmetaclass inhf_file_system.pywith# ty: ignore[conflicting-metaclass].Reviewed by Cursor Bugbot for commit 6310f19. Bugbot is set up for automated code reviews on this repo. Configure here.