A5rocks
A5rocks
What if mypy didn't warn about *any* unused ignores with error codes that are suppressed in that file? It *feels* worse than previous status quo, but it's also consistent (in...
On the other hand making file-level disabling of error codes different than project-level disabling of error codes feels disappointing. Do you get warned that an ignore is useless if you...
You can find actual instances of this by searching the mypy codebase for `is_error_code_enabled`. For instance, the first result when I try that locally only actually creates a visitor and...
This was fixed by https://github.com/python/mypy/pull/18214.
IIRC we described the behavior in relevant PR comments but I'm not completely sure if it's a complete description. Maybe tests works as a better description...
> Would be nice if this got caught by a linter/test somewhere, but am not sure about any decent way of approaching that. The best would probably be a way...
Idea: we could hook the `autodoc_process_signature` event and check everything has a docstring, warning otherwise. We already hook the event for other reasons so it wouldn't even be that big...
IMO this is less discoverable than a flag (e.g. `--all-checks`) but maybe I'm wrong. I agree the basic idea makes sense though.
> validate static format specifiers for known types like `float`, `int` I can't imagine this is very simple. However it's definitely possible to check for `__format__`! I'm not sure what...
cc @ilevkivskyi since I saw your changes w/r/t typevartuples when glancing over the merge conflicts. Maybe you'll have an idea of whether this Any-tuple thing is worth anything.