code-blockwise configuration settings
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by reviewing how mypy handles inline control comments and configuration such as allow-redefinition; done requires an agreed block-scoped configuration syntax and behavior, including how the setting applies within and outside the block.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100