typegun
Special Gun Special
—Super Smash Bros. Ultimate
Typegun is a small command-line utility for python to run a bunch of python typecheckers on a project, to see if there are any problems. This grew out of a script I would cart around, which I decided to make a reusable package.
(For the purposes of typegun, by typechecker I mean static analysis tools only; Not a "runtime type checker", of which there are many in Python. A "semi-static" typechecker like pyanalyze or pycroscope would be allowable here as a static analysis tool.)
This only includes typecheckers that have a reasonable shot at typing near-current-version python projects mostly-correctly, in my (non-scientific) opinion, a list which may vary over time. If you'd like to add more or bicker about the configurations these typecheckers should have, I'm happy to hear it. The versions of these typecheckers are completely unpinned, all the better to get the most recent versions of them probably. It also includes ruff, which is not a typechecker, but is very useful for code quality nonetheless.
Typegun is strategic about the order in which it runs its typecheckers, and this ordering is determined by the speed and utility of the typechecker. Ruff runs first because it runs very fast and never false-positives a type error at all, while still alerting you to other problems that may cause a type error, which the other typecheckers will detect more slowly later. Pyright runs second because it's fast and very correct to the python typing spec. Mypy runs after this because it's slower and has a couple typing problems. pytype runs last because it is slow and doesn't fully support Python 3.12 yet.
Example usage
In your project directory, do one of the following, depending on what you have installed already:
typegun
uvx typegun
pipx run typegun
pip install typegun --break-system-packages && typegun
etc etc
Illustrative diagram
Metadata
Release files for typegun 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| typegun-1.0.1.tar.gz | 89.2 kB | Without provenance | Details for typegun-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| typegun-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for typegun-1.0.1-py3-none-any.whl |
Total release size: 95.3 kB
Release files / typegun-1.0.1.tar.gz
| Download URL | typegun-1.0.1.tar.gz |
|---|---|
| Size | 89.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
101a47efbc5c76e7f204a20a769c096b1f2963890f676fe171ec6a46e6beee64
|
|
BLAKE2b-256 checksum How to use checksums |
53e1152c8ba4b6417a223447def5b0efb539f32a8e4d6cf9490af71badd23a97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Release files / typegun-1.0.1-py3-none-any.whl
| Download URL | typegun-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cb41ea95e813708ca8c6e70e1162e9ae41ae78e2ef5d7d0c48e47f9fdfd23d5b
|
|
BLAKE2b-256 checksum How to use checksums |
6221126f92fe7fdbf51c622ea0b502c13f9dc87af8f2e37409afe28c7e96f71c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Security for typegun 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.