Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

chore: resolve ty type checker diagnostics (41 errors)

Open
#53 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Stale
Tech stack
python

Research direction

Start by running the advisory ty typecheck and group the 41 diagnostics across custom_columns.py, postprocess.py, the test files, Makefile, pre-commit hook, and CI configuration. Resolve or narrowly suppress each reported diagnostic, then make the checks blocking by removing the advisory wrappers and verify that typecheck passes.

Written by the indexing model from the issue text.

Description

Summary

After adding ty (v0.0.23) as a type checker, the codebase has 41 diagnostics that need to be resolved before typecheck can become a blocking CI check and pre-commit hook.

Currently, typecheck is advisory (non-blocking) in both the Makefile (- prefix) and pre-commit (|| true).

Diagnostic categories

Source code (~14 errors)
  • custom_columns.py (7 errors) -- Passing list[dict] from .as_dict() calls where list[EntitySchema] is expected. Pydantic accepts dicts at runtime, but ty's static analysis doesn't know that. Fix: pass model instances directly, or add # ty: ignore comments.
  • postprocess.py (5 errors) -- dict.get() overload resolution failures on dicts with inferred narrow key types after isinstance guards.
Test code (~20+ errors)
  • Tests passing raw dicts where Pydantic model instances are expected (same pattern as source)
  • AnonymizerConfig(detect={...}) -- passing dict instead of Detect model
  • test_debug_logging.py -- tmp_path fixture typed as TempPathFactory instead of Path
  • tempfile.mktemp deprecation warning
Excluded (already handled)
  • tools/ is excluded via [tool.ty.src] exclude = ["tools/"] since those scripts use PEP 723 inline deps not in the venv.

Definition of done

  • All 41 diagnostics resolved (fix or suppress with targeted # ty: ignore[rule-name])
  • Remove || true from typecheck pre-commit hook
  • Remove - prefix from Makefile typecheck target
  • Typecheck CI job made blocking (remove continue-on-error if set)

References

  • PR #51 introduced ty and the advisory typecheck infrastructure
Dominant language
Python
Stars
129
Forks
21
Avg merge
2d 6h
Merged PRs (30d)
21

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA-NeMo/Anonymizer

All issues in NVIDIA-NeMo/Anonymizer

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.