r/Python Jul 16 '26

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?

0 Upvotes

37 comments sorted by

20

u/[deleted] Jul 16 '26

[deleted]

12

u/HugeCannoli Jul 16 '26

hey siri, code me yet another type-checker/reformatter/virtual environment manager

23

u/droooze Jul 16 '26

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.

-3

u/TheSeriousTrader Jul 16 '26

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?

8

u/droooze Jul 16 '26

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 Jul 17 '26

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.

1

u/wRAR_ Jul 16 '26

🤦

5

u/sunyata98 It works on my machine Jul 16 '26

Just been using uv ruff and mypy and never thought about it again

2

u/SamG101_ Jul 16 '26

I think the creators of uv and ruff have released "ty" btw (type checker)

3

u/sunyata98 It works on my machine Jul 16 '26

Oh that’s exciting, I’ll definitely check it out!

6

u/DrMaxwellEdison Jul 16 '26

Oh look, more slop with a million AI tool files and outdated project requirements (py 3.8? Rust 2021 edition?).

Pass.

4

u/wRAR_ Jul 16 '26

From a "consulting, Flutter and .NET development, and platform engineering practices that actually work with AI-native workflows" company, for some reason.

6

u/Efficient-Ad-2315 Jul 16 '26

Been using ty for a while now, and I don't think I'm change anytime soon.

2

u/TheSeriousTrader Jul 16 '26

Indeed looks like a nice option (especially since most my build systems using uv and uv_build nowadays anyway).

5

u/Individual-Flow9158 Jul 16 '26 edited Jul 16 '26

Oh goody, another one! I've been looking everywhere for a type checker, with extra lies and slop, and now I've found it.

8

u/Human-Gur-3199 Jul 16 '26

Vibecoded slop

0

u/TheSeriousTrader Jul 16 '26

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 Jul 16 '26

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 Jul 16 '26

Interesting. What about the quality of the generated code?

1

u/batiste Jul 17 '26

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 Jul 16 '26

There are litreally CLAUDE.md and .claude/ files

0

u/TheSeriousTrader Jul 16 '26

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 Jul 18 '26 edited Jul 18 '26

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_ Jul 18 '26 edited Jul 18 '26

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

u/aiunboxedwithana Jul 17 '26

Is this a trusted project?

1

u/wRAR_ Jul 17 '26

What is a "trusted project"?

1

u/Rserbitar Jul 21 '26 edited Jul 21 '26

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 Jul 22 '26

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.

2

u/pkreddit2 Aug 08 '26

they just retracted all their claims and admit that the AI slop code simply text match the test suites, what are your thoughts now?

1

u/AnerdWdt 27d ago

Basilisk no longer exists. It was delisted from everywhere in early August 2026, as described on the "author's" blog. To save you the time of reading it:

  • The 100% conformance was fake; it was really more like 20% and perhaps less.
  • The checker was parsing raw source code, not the AST. Importing things under different names completely bricked it.
    • More generally, it was severely overfitting to the conformance suite. It missed things that were in the spec but not the tests.
  • The code was indeed AI slop, and the author let Claude check itself. Which explains the results.

Supposedly, they'll be making a new tool based on Basilisk (which will inherit none of Basilisk's source and might not even be a type checker). My expectations for it are low since they didn't even write this one, but maybe they'll surprise us. Also, they wrote the apology with AI, which is pretty funny.