Skip to content

Implement ty fixes#586

Open
svij-sc wants to merge 11 commits intosvij/use-tyfrom
svij/use-ty-fixes
Open

Implement ty fixes#586
svij-sc wants to merge 11 commits intosvij/use-tyfrom
svij/use-ty-fixes

Conversation

@svij-sc
Copy link
Copy Markdown
Collaborator

@svij-sc svij-sc commented Apr 13, 2026

ty was introduced here: #585

This PR introduces relevant fixes for type check to pass.

@svij-sc svij-sc changed the base branch from main to svij/use-ty April 13, 2026 22:52
svij-sc and others added 2 commits April 15, 2026 00:59
Fixes all type errors found by ty after the mypy→ty migration:

- Remove redundant cast() calls (graph_data_types.py, eval_metrics.py)
- Fix `raise NotImplemented` → `raise NotImplementedError` (graph_dataset.py)
- Add explicit `import concurrent.futures` and `import absl.logging`
- Use `isinstance()` instead of `type() ==` for proper type narrowing (file_loader.py)
- Remove _Comparable protocol bound from SortedDict (sorted_dict.py)
- Add ty: ignore comments for unresolvable type narrowing cases
- Promote all ty rules back to default error severity
- Add overrides to suppress errors in generated *_pb2.py files
- Exclude notebooks from type checking

Co-Authored-By: shubhamvij <25601958+shubhamvij@users.noreply.github.com>
@svij-sc svij-sc force-pushed the svij/use-ty-fixes branch from ad2986a to 43536db Compare April 15, 2026 01:00
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