`report_internal_error` does not respect `stdout` and `stderr` in several places
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
When using mypy as a library and passing stdout and stderr into build.build it is reasonable to expect that it will be respected for all cases.
But, there are several places where report_internal_error does not respect the passed value and just dumps everything into sys.stdout:
But, there also places where report_internal_error is called with the correct streams:
I suggest to add stdout and stderr props to Options class. It would be possible to easily work with them from all these three missed places.
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 tracing stdout and stderr from build.build through the Options class, then inspect the report_internal_error calls in checker.py, checkexpr.py, semanal.py, and build.py. Done means the three missed call sites use the passed streams rather than sys.stdout, while preserving the existing behavior in build.py.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100