Explicit Variables Warning Issue
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Describe the bug
Coverage shows me explicit warning when being used with mypy on this:
console: Console = Console()
I don't see the problem with having an explicit type set
Why does it warn against this, can I disable it globally
Also, doing console = Console() doesn't seem to solve the problem as well
To Reproduce
How can we reproduce the problem? Please be specific. Don't link to a failing CI job. Answer the questions be
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
Python 3.13
Mypy and Coverage
mypy src --html-report test
(Or any report)
Same result when I do coverage run mypy src
For reference I've opened a similar issue in the pycoverage repository and they told me it might be a mypy thing
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 reproducing the report with mypy src --html-report test and coverage run mypy src, using the Python 3.13 context from the issue. Compare the warning from direct mypy execution with the coverage invocation and read the linked coveragepy issue for context. Done means identifying which tool emits the warning and documenting the applicable configuration or expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100