Re:Ty: A fast Python type checker and language server
by kodablah on Wednesday May 07, 2025 @02:36PM
(#43919171)
Fingers crossed this is/becomes extensible. Pyright and MyPy both suffer from lack of extensibility IMO (Pyright doesn't consider the use case and MyPy plugins come across as an afterthought with limited capabilities). There are many things that can be built on the back of type-checked AST.
[ Parent
| on HN ]
Re:Ty: A fast Python type checker and language server
by notatallshaw on Wednesday May 07, 2025 @04:12PM
(#43920133)
Charlie already said in a podcast (https://www.youtube.com/watch?v=XVwpL_cAvrw) that they are not looking to make it extensible. That it's considered a feature that type checking works interchangeably across tools and projects.
Ruff's linting and formatting is more likely to get plugin/extension support at some point in the future.
Re:Ty: A fast Python type checker and language server
by WhyNotHugo on Wednesday May 07, 2025 @05:17PM
(#43920646)
I wonder how they'll handle situations like Django, which don't seem expressible via stubs.
Re:Ty: A fast Python type checker and language server
by anentropic on Thursday May 08, 2025 @06:31AM
(#43924858)
I love Django, but maybe Django should change more from their side? e.g. Django 6?
Re:Ty: A fast Python type checker and language server
by dathinab on Wednesday May 07, 2025 @05:49PM
(#43920895)
not specific to just your answer but why do people mention ruff?
Ruff is a linter which (intentionally) does close to no type checking.
So you pretty much have to pair it up with a type check to get any even just half way decent static code analysis.
Re:Ty: A fast Python type checker and language server
by notatallshaw on Monday May 12, 2025 @11:53AM
(#43964412)
Because ty was built out of the ruff code base, and is maintained by the same team, and the type checking abilities are intended to help ruff with linting rules in the future.
Re:Ty: A fast Python type checker and language server
by andenacitelli on Wednesday May 07, 2025 @02:38PM
(#43919190)
I’ve had this same thought. Ruff doesn’t support extensions / custom lint rules that I’m aware of, so maybe don’t get your hopes up.
Re:Ty: A fast Python type checker and language server
by the_mitsuhiko on Wednesday May 07, 2025 @02:53PM
(#43919331)
Not supporting plugins for a type checker to me is a plus. It’s quite frustrating that some Python projects only typecheck if you have plugins. That is a major source of frustration.
Re:Ty: A fast Python type checker and language server
by Redoubts on Wednesday May 07, 2025 @04:11PM
(#43920121)
I mean that kind of code exists; things like attrs are too magical otherwise
Re:Ty: A fast Python type checker and language server
by zem on Wednesday May 07, 2025 @06:18PM
(#43921090)
python packages that do a lot of metaprot can only be properly type checked if you replicate that metaprogramming at the type level. e.g. if dataclasses were not part of the standard library they would need a plug-in to be handled correctly.