geruh commented on issue #2946:
URL: 
https://github.com/apache/iceberg-python/issues/2946#issuecomment-3793026347

   Wow this is super cool @kevinjqliu!
   
   Bringing in ty and running a check brought up 450+ errors. Most don't seem 
like real bugs since, ty is stricter than mypy by default (seems like we need 
to opt out of strictness for alignment).
   
   Here is a basic overview:
   - ~200 errors come from the Pydantic models because of `alias="kebab-case"`. 
ty doesn't have a Pydantic plugin like mypy does
   - ~90 errors from Visitor pattern method overrides with different parameter 
names 
   - Optional deps, and some PyArrow types 
   
   I think the pydantic issues are the biggest blocker here, and from the docs 
they're acknowledging the mypy plugins and are considering to add it into ty. 
([docs](https://docs.astral.sh/ty/reference/typing-faq/#does-ty-support-mypy-plugins))
   
   I think for now what we can do is plan for migration:
   
   1.  Use ty locally to find any errors that are acceptable by both ty and mypy
   2. Add a `[tool.ty]` config in pyproject.toml so we can run `uvx ty check` 
manually
   3. Wait for Pydantic support before adding ty to pre-commit
   


-- 
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