Skip to content

ty checks every Python file with strict settings #243

Open

Description

@ooloth

Current state

Type mistakes that strict checking would catch can reach main, because ty runs with its default rule levels while python.md requires strict settings. ty.toml sets only the Python version and an exclude. With every rule raised to error, ty reports 107 problems across about 30 files: 37 missing @override decorators, 26 missing type arguments, 25 truthiness tests on values that can be None, 18 unsound returns or assignments, and one blanket ignore comment. The most are in fetch_pr_comments.py, test_cc.py and review_dependency_bump.py.

Ideal state

  • check and CI run ty with strict settings, as python.md requires.
  • Every Python file in the repo passes that check.

Decisions

Constraints

Open

No open decisions.

Starting points

  • ty.toml: the settings ty runs with today
  • scripts/checks/types.bash: how check and CI run ty
  • tools/agents/config/standards/python.md: the Must this falls short of

Activity

  1. ooloth commented on Nov 4, 2026

    @ooloth
    OwnerAuthor

    Two more places where this repo falls short of python.md:

    • Unannotated functions pass every check. python.md requires an annotation on every function signature, but ruff.toml selects no ANN rules. Run with --select ANN001,ANN201,ANN202, ruff reports 16 missing annotations, such as feed and stdout in scan-system/scripts/test_classify_gh_response.py:105.
    • beartype is not enabled in tests. python.md has a Should for it. scripts/checks/types.bash installs beartype, but no Python file in the repo imports it.
  2. added
    maintenanceUpkeep that changes how the repo is built, not what it does
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceUpkeep that changes how the repo is built, not what it does

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions