oresttokovenko opened a new pull request, #4207:
URL: https://github.com/apache/iceberg-python/pull/4207

   # What
   
   Adds `ty` to the type-checking setup that mypy already owns, and cleans up 
the suppressions that a second checker exposes.
   
   - `ty==0.0.84` runs as a pre-commit hook in the `manual` stage, so it 
reports problems only when asked. It is not part of the gate.
   - `mypy==1.18.2` moves into the `dev` dependency group, so the version the 
hook runs and the version a developer runs are the same. `vendor/` is excluded 
from mypy.
   - `tests/` is excluded from ty for now, since the tests account for about 
400 of the 851 diagnostics that ty reports on the whole tree.
   - `missing-type-argument = "error"` makes ty report the cases that mypy 
catches with `disallow_any_generics`.
   - Every `# type: ignore` in the package names its error code, and 
`Singleton` gets real annotations instead of a suppression.
   
   # Why
   
   ty is Astral's experimental type checker. The repository already pinned 
`ty==0.0.84` in the `dev` group, but nothing ran it, so the pin had no effect. 
The manual stage lets people try it without blocking anyone while the 
diagnostic count comes down, and the configuration is written so that the hook 
can become a gate later without further changes.
   
   Naming the error code in every suppression matters once two checkers read 
the same file, because a bare ignore also hides a new error of a different 
kind. That pass touched 20 files in the package and found one class, 
`Singleton`, whose suppressions were only needed because the cache key was 
untyped.
   
   A follow-up, part 2, moves this hook into the noxfile that replaces the 
pre-commit configuration.
   
   # Tests
   
   - `ty check` with the project configuration reports 279 diagnostics in the 
package. The hook is not a gate, so this number is expected to fall in 
follow-ups.
   - `mypy` reports no issues in 91 source files.
   - CI runs the existing Makefile-based checks unchanged, since this change 
does not touch the build tooling.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to