mypy icon indicating copy to clipboard operation
mypy copied to clipboard

code-blockwise configuration settings

Open yalwan-sage opened this issue 2 years ago • 0 comments

Feature

In mypy, we can do something like # type: ignore [error-code]

For some developer tools, we can use some blockwise settings, ex:

# fmt: off
blabla
# fmt: on

Momentarily configuring some mypy settings in a similar fashion would be useful

Pitch

A specific reason why I'd like to see this is that I have a codebase where allow-redefinition is False (and this is good). But I have a small region where I have a lot of type narrowing to do and in this case allowing a block of redefinitions is far more convenient. Plus, the control comments would signal to the reader that this is happening.

yalwan-sage avatar Jun 29 '23 09:06 yalwan-sage