typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

match `run` / `runctx` / `runeval` to exec / eval parameters

Open asottile opened this issue 3 months ago • 4 comments

https://github.com/python/cpython/blob/daafacf0053e9c329b0f96447258f628dd0bd6f1/Lib/bdb.py#L924

asottile avatar Nov 18 '25 17:11 asottile

maybe more explicitly this should be Any | None ? though I'm not sure if the BdbQuit part of this is possible?

asottile avatar Nov 18 '25 17:11 asottile

though I'm not sure if the BdbQuit part of this is possible?

yeah, that looks like dead code to me... maybe it's worth adding a comment to the stub? At first glance the runtime implementation definitely looks like it could return None if you ever hit the except branch

AlexWaygood avatar Nov 18 '25 17:11 AlexWaygood

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

github-actions[bot] avatar Nov 18 '25 17:11 github-actions[bot]

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

github-actions[bot] avatar Nov 21 '25 17:11 github-actions[bot]