Standalone Variable Static Typing
Project description
Standalone Variable Static Typing
Full-on Python Static Typing
Standalone Variable Static Type Checker using Abstract Syntax Trees
Why?
Python is an amazing programming language; my favorite one for a lot of reasons. With the broad functionality, ease of use, development speed, and friendly community; I could be here all day saying good things about it.
One of the major selling points the dynamic typing, at least initially.
When you start scaling Python and using it on huge projects dealing with a lot of different entities and flows you can make a mistake and find the pitfall of not knowing why your variable is not behaving as you wish it was; between other issues (if you try to statically type an existing codebase with mypy you'll find how bad your code is in terms of type consistency; at least that happened to me).
After fixing a huge mess I wanted to go a step further and not only enforce the typing of functions/classes input and output but to type my standalone variables as well until I found that mypy doesn't check that because his goal is to find the balance between dynamic and static typing; I wanted to go full-on static.
At first, I created a simple file to do this, but soon I found that I needed a proper implementation of this to spread to all my projects and possibly help the community.
I'd like to extend immense gratitude to @alphasensei for pioneering the research and developing the initial proof of concept for this library.
This is an attempt of bringing full-on static typing to Python and, with it, much more robust codebases.
Quick start
Svst can be installed using pip:
python3 -m pip install -U svst
You can type-check the standalone variables of a program like this:
svst PROGRAM
You can type-check a program including the mypy functionality like this as well:
svst --mypy PROGRAM
Integrations
- Vim
- PyCharm
- VS Code
- pre-commit
Documentation
Contributing
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file svst-0.1.0.tar.gz.
File metadata
- Download URL: svst-0.1.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81cf9be4bd175f744f87b114aa4a732ea03e6aebf5e95a6ea678b80680c192c8
|
|
| MD5 |
142fa92b7b9d438d67860319b49a860d
|
|
| BLAKE2b-256 |
07372e9bef3e2dcc1aab372adf109e83f966a999334e41b04faab7231c35b801
|
File details
Details for the file svst-0.1.0-py3-none-any.whl.
File metadata
- Download URL: svst-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7672c98a8e5ca1d0b986a8aeccaf35f210613b283a00f1f5a51182a4a6e376a
|
|
| MD5 |
0d8c70d4317922a2f4e62f0947f9daff
|
|
| BLAKE2b-256 |
addcf0780bfce08c7d0042c3191cde78e433d59eac996c92c22aa1c296415b16
|