@@ -90,27 +90,27 @@ def text_in_fig() -> set[str]:
90
90
"""
91
91
Return the set of all text in the figure
92
92
"""
93
- return {t .get_text () for t in plt .gcf ().findobj (mpl .text .Text )} # type: ignore[attr-defined] # mpl error?
93
+ return {t .get_text () for t in plt .gcf ().findobj (mpl .text .Text )}
94
94
95
95
96
96
def find_possible_colorbars () -> list [mpl .collections .QuadMesh ]:
97
97
# nb. this function also matches meshes from pcolormesh
98
- return plt .gcf ().findobj (mpl .collections .QuadMesh ) # type: ignore[return-value] # mpl error?
98
+ return plt .gcf ().findobj (mpl .collections .QuadMesh )
99
99
100
100
101
101
def substring_in_axes (substring : str , ax : mpl .axes .Axes ) -> bool :
102
102
"""
103
103
Return True if a substring is found anywhere in an axes
104
104
"""
105
- alltxt : set [str ] = {t .get_text () for t in ax .findobj (mpl .text .Text )} # type: ignore[attr-defined] # mpl error?
105
+ alltxt : set [str ] = {t .get_text () for t in ax .findobj (mpl .text .Text )}
106
106
return any (substring in txt for txt in alltxt )
107
107
108
108
109
109
def substring_not_in_axes (substring : str , ax : mpl .axes .Axes ) -> bool :
110
110
"""
111
111
Return True if a substring is not found anywhere in an axes
112
112
"""
113
- alltxt : set [str ] = {t .get_text () for t in ax .findobj (mpl .text .Text )} # type: ignore[attr-defined] # mpl error?
113
+ alltxt : set [str ] = {t .get_text () for t in ax .findobj (mpl .text .Text )}
114
114
check = [(substring not in txt ) for txt in alltxt ]
115
115
return all (check )
116
116
@@ -122,7 +122,7 @@ def property_in_axes_text(
122
122
Return True if the specified text in an axes
123
123
has the property assigned to property_str
124
124
"""
125
- alltxt : list [mpl .text .Text ] = ax .findobj (mpl .text .Text ) # type: ignore[assignment]
125
+ alltxt : list [mpl .text .Text ] = ax .findobj (mpl .text .Text )
126
126
return all (
127
127
plt .getp (t , property ) == property_str
128
128
for t in alltxt
0 commit comments