Set the config file’s location with an environment variable.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Feature
Similar to setting MYPYPATH:
Allow setting mypy’s config file location with an environment variable, e.g.:
$ export MYPYCFG=~/work/settings/mypy.ini
Pitch
Most, if not all, of my Python projects use the same mypy.ini file, so currently I run mypy using:
mypy --config-file $MYPYCFG .
It would be easier if one could just run mypy, with mypy using $MYPYCFG as the config file setting.
What I do not know is whether anyone besides me would benefit from such a feature, so this might be too big an ask.
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
Start by locating mypy's command-line configuration handling and its tests; the issue does not name specific files or entry points. Compare the existing --config-file behavior with the proposed MYPYCFG environment variable, and consider the current working-directory invocation as the verification case. Done means mypy can use the environment-provided config without the explicit option.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100