Mypy type checking extension for Python IDLE
Project description
IdleTypeCheck
Python IDLE extension to perform mypy analysis on an open file
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, alongsideZzDummy
there 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
typecheck
. 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, alongsideZzDummy
there should be and option calledtypecheck
. This is where you can configure how lintcheck 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 daemon_flags
, 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 daemon_flags
, 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
# types: error: Incompatible types in assignment (expression has type "str", variable has type "int")
to
# types: 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.
Project details
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
Hashes for idletypecheck-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42d9d82eb48a8cf7370ad8f0f659afea96d7357fdd7c134d4dcb3019005d2ecc |
|
MD5 | 5dd818b576814219a8692b458931c72a |
|
BLAKE2b-256 | fef2d065a8a1b38677395926d4a10a08727610c771e56fa2199cd99380008407 |