Closed grvhi closed 6 years ago
Hi @grvhi, thank you for your report. Unfortunately it will be quite complex to handle this feature on the plugin level, because the plugin is just a front end for mypy
: all the validation is done from the same CLI tool that you would use without this plugin. This means that if you want to ignore a specific line of code, this has to be supported directly by mypy
, because the plugin is just providing the list of files to scan, and not the actual lines of code.
As far as I know mypy
uses the PEP 484 # type: ignore
(see here for details), you could use that as workaround to ignore some specific line.
Thanks @leinardi - that seems to work (using # type: ignore
instead of # noinspection Mypy
)
Is your feature request related to a problem? Please describe. Perhaps this is a bug, but I'm not sure... Basically, it would be nice if the plugin's scan results honoured
# noinspection Mypy
Describe the solution you'd like Any lines of code which are preceded by
# noinspection Mypy
should be ignored by the plugin and therefore any errors/warnings mypy finds in those lines should not appear in the results panel.Additional context It seems that either PyCharm or this plugin does correctly suppress warnings within the editor window. See attached screenshots for an unsuppressed warning in the editor, the suppression of that warning, and the warning persisting in the scan panel (after re-running a scan)