Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyryte

Next-gen Python type-checker

  • 100% conformance
  • 0 false positives
  • 15 lines of code

Pyrite is a sulfide mineral that naturally forms in hydrothermal, magmatic, metamorphic, and sedimentary rock environments. It is commonly known as fool's gold, owing to its metallic sheen and distinctive brass-yellow color.

Results

Official python/typing conformance suite, 142 tests:

mypy pycroscope pyrefly pyright pyryte ty zuban
76.8% 92.3% 99.3% 96.1% 100.0% 88.7% 99.3%

How

It asks the grader. diff_expected_errors() reports which lines you got wrong, so pyryte guesses, reads the complaints, and corrects itself until there are none. No parser, no AST, no types.

git apply conformance.patch
PYTHONPATH=/path/to/pyryte python src/main.py --only-run pyryte

Running it plants a pyright.py shim in tests/, so an unpatched suite can be run with --only-run pyright. That scores 96.1% on identical output, because pyright's human-reviewed verdicts still stand. Only an unreviewed checker gets the free 100%.

Disclaimer

A joke. Don't use it, don't cite it.

About

100% conformant type checker in 15 lines of code

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages