IdleTypeCheck
Python IDLE extension to perform mypy analysis on an open file
Notice
This project is superseded by my other IDLE extension, IdleMypyExtension, which uses the mypy daemon instead and has many more features.
What does this extension do?
This IDLE extension hooks into mypy to type check the currently open file. When type checking the currently open file with the "Type Check File" command, it will add comments to your code wherever mypy had something to say about about that line. You can remove type comments from the currently selected text with the "Remove Type Comments" command. Additionally, you can jump to the next comment this extension created in your file with the "Find Next Type Comment" command.
Note: On use, creates folder mypy within the idle user directory.
On Linux systems, this is usually ~/.idlerc/mypy.
Installation (Without root permissions)
- Go to terminal and install with
pip install idletypecheck[user]. - Run command
idleuserextend; idletypecheck. You should see the following output:Config should be good! Config should be good!. - Open IDLE, go to
Options->Configure IDLE->Extensions. If everything went well, alongsideZzDummythere should be and option calledidletypecheck. This is where you can configure how idletypecheck works.
Installation (Legacy, needs root permission)
- Go to terminal and install with
pip install idletypecheck. - Run command
idletypecheck. You will likely see a message sayingtypecheck not in system registered extensions!. Run the command given to add lintcheck to your system's IDLE extension config file. - Again run command
typecheck. This time, you should see the following output:Config should be good!. - Open IDLE, go to
Options->Configure IDLE->Extensions. If everything went well, alongsideZzDummythere should be and option calledidletypecheck. This is where you can configure how idletypecheck works.
Information on options
For extra_args, see mypy --help for a list of valid flags.
This extension sets the following flags to be able to work properly:
--hide-error-context
--no-color-output
--show-absolute-path
--no-error-summary
--soft-error-limit=-1
--show-traceback
--cache-dir="~/.idlerc/mypy"
If you add the --show-column-numbers flag to extra_args, when using the
"Type Check File" command, it will add a helpful little ^ sign
in a new line below the location of the mypy message that provided a column
number, as long as that comment wouldn't break your file's indentation too much.
If you add the --show-error-codes flag to extra_args, when using the
"Type Check File" command, when it puts mypy's comments in your code, it will
tell you what type of error that comment is. For example, it would change the
error comment
# typecheck: error: Incompatible types in assignment (expression has type "str", variable has type "int")
to
# typecheck: assignment error: Incompatible types in assignment (expression has type "str", variable has type "int")
search_wrap toggles weather searching for next type comment will wrap
around or not.
Metadata
Release files for idletypecheck 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 |
|---|---|---|---|---|
| idletypecheck-1.0.1.tar.gz | 52.6 kB | Without provenance | Details for idletypecheck-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| idletypecheck-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for idletypecheck-1.0.1-py3-none-any.whl |
Total release size: 92.0 kB
Release files / idletypecheck-1.0.1.tar.gz
| Download URL | idletypecheck-1.0.1.tar.gz |
|---|---|
| Size | 52.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3511ba6b0f6a2975435c7a2cc606be90bed82f61d1b52b238a311a31ede823a
|
|
BLAKE2b-256 checksum How to use checksums |
9450e1796c2955a449bb47e461479dee1ea942f82174593861420cb2db8064e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Release files / idletypecheck-1.0.1-py3-none-any.whl
| Download URL | idletypecheck-1.0.1-py3-none-any.whl |
|---|---|
| Size | 39.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92946c1072f4092ad68ca35cd4c45e23f4d54b589218b0c81745519a2bd24341
|
|
BLAKE2b-256 checksum How to use checksums |
f4ef7db3d54c371422d032b1ca1b9e356e2bf1104467ccbe6c8c6c971c4f46a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Security for idletypecheck 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.