Skip to content

Commit a144f98

Browse files
committed
Code review suggestions
Co-authored-by: John Litborn <[email protected]>#
1 parent a1e4916 commit a144f98

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

newsfragments/3121.misc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Improve type annotations in several places by removing `Any` usage.

src/trio/_core/_concat_tb.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,8 @@ def controller( # type: ignore[no-any-unimported]
103103
and operation.args[0] == "tb_next"
104104
) or TYPE_CHECKING: # pragma: no cover
105105
return tb_next
106-
if TYPE_CHECKING:
107-
raise RuntimeError("Should not be possible")
108-
return operation.delegate() # Delegate is reverting to original behaviour
106+
# Delegate is reverting to original behaviour
107+
return operation.delegate() # type: ignore[no-any-return]
109108

110109
return cast(
111110
TracebackType,

0 commit comments

Comments
 (0)