r/Python • u/TheSeriousTrader • 6d ago
Discussion New Python type checker
Was checking out some Python type checkers other than Pyright, and I came across one that I never yet heard of before. But it is the only one scoring 100% on the official python typing conformance suite.
It is named Basilisk and on their website they have some other bold claims (like it is also the fastest one). But their GitHub repo only has few stars.
Does anyone have any experience using this or perhaps I missing something?
22
u/droooze 6d ago
I think it was very recently released, maybe less than a month ago, so not many people would have used it.
AFAIK the vetting so far done on it is a typing council member reviewing and accepting a conformance suite PR.
Personally the amount of type checkers is getting a bit too much, this feels like packaging and build tools all over again.
-5
u/TheSeriousTrader 6d ago
When I checked some alternatives, I was indeed surprised how many different ones there are in the making. Possible AI companies want to decouple their tools from VS Code, and this is one of the components required?
7
u/droooze 6d ago
Most coding assistant tools (I'm talking traditional ones here that emit diagnostics and go-to-definition, etc, not LLM autopredict ones) these days are designed according to the language server protocol (LSP).
From the tool user perspective, decoupling from VS Code sounds harder than it actually is, all you actually have to do is (1) use an editor that supports the features from LSP that you want and (2) isolate the part of the code from the tool that directly interfaces with an LSP. For example, I've gotten pyright to work on KDE's Kate editor before.
From the tool developer perspective, if you wanted to decouple from VS Code, you should implement everything according to the LSP, and avoid items which are VS-Code-specific. VS Code certainly doesn't force tooling developers to get locked in to VS Code, that's the tooling developer's own choice.
0
u/TheSeriousTrader 5d ago
I guess I poorly expressed myself. But I meant to say AI companies don't want to rely on tooling from competitors (like VS Code). If you want to get your AI solutions to developers, better make sure you "control" the tools they use.
So these AI companies have to develop their own stack and to expedite that, they buy smaller companies like Astral, Oven, etc.
Building an editor with LSP support is one thing, but existing tools like VS Code provides so much more functionality. I guess part of this could be solved with agents. But when I look at the amount of plugins/features used by developers, it isn't a trivial job either.
10
u/HugeCannoli 6d ago
hey siri, code me yet another type-checker/reformatter/virtual environment manager
4
u/sunyata98 It works on my machine 6d ago
Just been using uv ruff and mypy and never thought about it again
2
5
u/Efficient-Ad-2315 6d ago
Been using ty for a while now, and I don't think I'm change anytime soon.
2
u/TheSeriousTrader 6d ago
Indeed looks like a nice option (especially since most my build systems using uv and uv_build nowadays anyway).
4
u/Individual-Flow9158 6d ago edited 6d ago
Oh goody, another one! I've been looking everywhere for a type checker, with extra lies and slop, and now I've found it.
5
u/DrMaxwellEdison 6d ago
Oh look, more slop with a million AI tool files and outdated project requirements (py 3.8? Rust 2021 edition?).
Pass.
9
u/Human-Gur-3199 6d ago
Vibecoded slop
0
u/TheSeriousTrader 6d ago
Didn't check the code base yet myself, but will check it now for sure. I would have guessed that AI is not there yet to vibecode a complete Python type checker (would also likely be a type checker just focused to pass the conformance suite).
4
u/batiste 6d ago
Actually, I think AI is totally able to do that today. I added a complex type system to my already existing toy language and was floored at how good it was... Took a long time, and a large plan, but it did it..
0
u/TheSeriousTrader 6d ago
Interesting. What about the quality of the generated code?
1
u/batiste 5d ago
Pretty decent as far as I can tell. It was a few month ago but here is the project: https://github.com/batiste/blop-language
It also plugged some important bugs that I missed... Basically I was floored.
3
u/Human-Gur-3199 6d ago
There are litreally CLAUDE.md and .claude/ files
0
u/TheSeriousTrader 6d ago
Indeed noticed that. But always difficult to judge how much of it is used without looking at the source code itself.
And to be honest if these AI tools get better and the resulting code is fine, would not automatically classify it anymore as code-vibing (agentic engineering would be more appropriate).
2
u/BeamMeUpBiscotti 4d ago edited 4d ago
The commit history makes me suspicious that the creator just told claude to loop until the conformance tests all pass, which I guess is a good way to game the conformance metrics
It makes me question whether it behaves properly outside of the cases explicitly tested by the conformance suite (a lot of type inference and refinement behaviors aren't standardized, for example), and how many of the tests are passing because of hacks rather than a principled/sound design.
That said there's nothing wrong with rushing for full conformance and then fleshing out the rest of it later, I'm just skeptical that this process results in a reliable/maintainable tool.
2
u/wRAR_ 4d ago edited 4d ago
makes me suspicious that the creator just told claude to loop until the conformance tests all pass
I think that part is clear from their development and contribution docs and the repo issues...
which I guess is a good way to game the conformance metrics
Yeah, totally.
I'm just skeptical that this process results in a reliable/maintainable tool.
Two data points I had in mind regarding this.
One, I also was wondering how was it done after realizing that it's very likely what you said, and found a random PR "PEP conformance: +7 files pass (98.6%), false positives 120 → 54". Its diff is +6565 -1000.
Two, the company, which as I already pointed in another reply, is explicitly "Flutter and .NET", and it seems to be this one guy whose LinkedIn history also shows no Python background.
1
1
u/Rserbitar 1d ago edited 1d ago
It has inlay typhints with the neovim plugin. Does any other typechecker have inline typehints in neovim? I never configured that.
Edit: turns out there is 'vim.lsp.inlay_hint' for alls lsps. Does this work with ty or pyrefly in neovim as inline typehints?
Never seen that so far.
1
u/elisspace 11h ago
Yeah it's exactly as advertised. Best in class. Vibe-coded or not, it simply works. I find it mildly amusing that some people truly will cut off their nose to spite their face on this stuff.
17
u/zunjae 6d ago
Not sure if I like the Ai slop
Can I trust this project?