Package: idlemypyextension
IdleMypyExtensionPython IDLE extension to perform mypy analysis on an open fileWhat does this extension do?This IDLE extension hooks into the mypy daemon to type check the currently
open file or provide a function signature suggestion for the nearest function
to the top from the current input cursor location. 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. Finally, you can add
an inferred function signature to your file with the "Suggest Signature"
command when you are close by a function definition.Note: On use, creates foldermypywithin the idle user directory.
On Linux systems, this is usually~/.idlerc/mypy.Installation (Without root permissions)Go to terminal and install withpip install idlemypyextension[user].Run commandidleuserextend; idlemypyextension. You should see the following
output:Config should be good! Config should be good!.Open IDLE, go toOptions->Configure IDLE->Extensions.
If everything went well, alongsideZzDummythere should be and
option calledidlemypyextension. This is where you can configure how
idlemypyextension works.Installation (Legacy, needs root permission)Go to terminal and install withpip install idlemypyextension.Run commandidlemypyextension. You will likely see a message sayingidlemypyextension not in system registered extensions!. Run the command
given to add idlemypyextension to your system's IDLE extension config file.Again run commandidlemypyextension. This time, you should see the
following output:Config should be good!.Open IDLE, go toOptions->Configure IDLE->Extensions.
If everything went well, alongsideZzDummythere should be and
option calledidlemypyextension. This is where you can configure how
idlemypyextension works.Information on optionsaction_max_seccontrols how long an action is allowed to take at most,
in seconds. Default is "None".Fordaemon_flags, seemypy --helpfor 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-numbersflag todaemon_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-codesflag todaemon_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_wraptoggles weather searching for next type comment will wrap
around or not.suggest_replacetoggles weather Suggest Signature will replace the
existing function definition or just add a comment with the suggested
definitiontimeout_minscontrols how long the mypy daemon will time out after,
in minutes.