New linter Gawain forces type hints on every Python variable, not just functions
A developer released Gawain, an open-source tool that checks Python code for missing type annotations on variables, function parameters, return values, and class attributes, not just functions as existing tools like ruff's ANN rules do. After confirming all annotations are present, Gawain hands the code off to a type checker, either ty or pyrefly, to verify the declared types are actually correct. Example output shows Gawain flagging unannotated variables and class attributes before running the deeper type check.