Incompatibility with `warn_unused_ignores = True`
See original GitHub issueRunning mypy with pre-commit while having warn_unused_ignores = True
in mypy.ini seems to give me these errors:
some/python/file.py:75: error: unused 'type: ignore' comment
The type: ignore
isn’t actually unused and running just mypy some/python/file.py
(i.e. without pre-commit) on the command line (with same exact mypy version 0.720) gives no errors whatsoever.
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (10 by maintainers)
Top Results From Across the Web
The mypy command line - mypy 0.991 documentation
This flag will make mypy report an error whenever your code uses an unnecessary cast that can safely be removed. --warn-unused-ignores#. This flag...
Read more >ignoring warning "-Wunused-result" - c++ - Stack Overflow
Cast the return value to void if you really want to ignore it (you probably don't). Fix the actual problem by actually using...
Read more >Warn about unused Optional.some(()) - Swift Forums
Hi all, Right now, expressions that evaluates to Optional<()>, Optional<Optional<()>>… gets special treatment when it's unused.
Read more >Warning Options (Using the GNU Compiler Collection (GCC))
Level 1 of -Wformat-truncation enabled by -Wformat employs a conservative approach that warns only about calls to bounded functions whose return value is...
Read more >Warn-by-default Lints - The rustc book
Unused assignments may signal a mistake or unfinished code. If the variable is never used after being assigned, then the assignment can be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
if you share your setup or repository it’s possible we can help, I’d suggest a whole new issue though as this is off topic here
it is the current behaviour, this just calls
mypy
after all