From 0dd3adb42cc6db7c78b0d71572ccdc9be177d6b6 Mon Sep 17 00:00:00 2001 From: Hassan Kibirige Date: Mon, 10 Mar 2025 14:53:09 +0300 Subject: [PATCH] Fix SubplotSpec.get_gridspec type hint SubplotSpec.__init__ accepts an instance of GridSpecBase, the getter function should return a GridSpecBase as well. --- lib/matplotlib/gridspec.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/gridspec.pyi b/lib/matplotlib/gridspec.pyi index 08c4dd7f4e49..3bf13ee17c4e 100644 --- a/lib/matplotlib/gridspec.pyi +++ b/lib/matplotlib/gridspec.pyi @@ -115,7 +115,7 @@ class SubplotSpec: def num2(self) -> int: ... @num2.setter def num2(self, value: int) -> None: ... - def get_gridspec(self) -> GridSpec: ... + def get_gridspec(self) -> GridSpecBase: ... def get_geometry(self) -> tuple[int, int, int, int]: ... @property def rowspan(self) -> range: ...