Skip to content

Commit 7a1461c

Browse files
committed
Add comment explaining rationale
1 parent bafbe9c commit 7a1461c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/pyplot.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,9 @@ def isinteractive() -> bool:
556556
return matplotlib.is_interactive()
557557

558558

559+
# Note: The return type of ioff being AbstractContextManager instead of ExitStack is deliberate.
560+
# See https://github.com/matplotlib/matplotlib/issues/27659
561+
# and https://github.com/matplotlib/matplotlib/pull/27667 for more info.
559562
def ioff() -> AbstractContextManager:
560563
"""
561564
Disable interactive mode.
@@ -596,6 +599,9 @@ def ioff() -> AbstractContextManager:
596599
return stack
597600

598601

602+
# Note: The return type of ion being AbstractContextManager instead of ExitStack is deliberate.
603+
# See https://github.com/matplotlib/matplotlib/issues/27659
604+
# and https://github.com/matplotlib/matplotlib/pull/27667 for more info.
599605
def ion() -> AbstractContextManager:
600606
"""
601607
Enable interactive mode.

0 commit comments

Comments
 (0)