Skip to content

Commit 8c9b554

Browse files
FeldrinHImpaler343
authored andcommitted
Add comment explaining rationale
1 parent 25a2995 commit 8c9b554

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
@@ -554,6 +554,9 @@ def isinteractive() -> bool:
554554
return matplotlib.is_interactive()
555555

556556

557+
# Note: The return type of ioff being AbstractContextManager instead of ExitStack is deliberate.
558+
# See https://github.com/matplotlib/matplotlib/issues/27659
559+
# and https://github.com/matplotlib/matplotlib/pull/27667 for more info.
557560
def ioff() -> AbstractContextManager:
558561
"""
559562
Disable interactive mode.
@@ -594,6 +597,9 @@ def ioff() -> AbstractContextManager:
594597
return stack
595598

596599

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

0 commit comments

Comments
 (0)