Provide an easy way to opt out of changes to default options
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
We are planning to change the defaults of some options in mypy 2.0, and it's likely that we'll have more such changes in mypy 3.0 and so on. Some of these require work from many users, for example if we enable a check by default that generates lots of errors (even if they are mostly correct).
Here are some things we might want to change the future:
- Enable various optional error codes by default
- Check bodies of untyped defs by default
- Enable flags that improve conformance to standards but that break backward compatibility
- Changes to checks enabled by
--strict
I think we could provide a way to freeze options to the current level, so that users wouldn't need to touch their config files (or fix issues) on each major feature release. For example, --defaults=1.x could tell mypy to use the defaults mypy versions 1.x use. This could also be set in the config file.
This would make it easier for us to make changes to defaults, and easier for users to adopt these changes at their own pace, while still getting access to new Python versions and new mypy features.
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
No files, tests, or entry points are named. Start by mapping how mypy defines and loads default options and configuration, then determine how versioned defaults would interact with optional error codes, untyped-definition checks, standards flags, and --strict. Done means a documented, maintainable opt-out mechanism is specified and its behavior across future releases is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100