Skip to content

Commit e22a6e8

Browse files
authored
Merge pull request matplotlib#30245 from cvanelteren/allow-inherritance-rc
2 parents 72aa3f7 + 919c7b9 commit e22a6e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -799,13 +799,13 @@ def find_all(self, pattern):
799799
800800
"""
801801
pattern_re = re.compile(pattern)
802-
return RcParams((key, value)
803-
for key, value in self.items()
804-
if pattern_re.search(key))
802+
return self.__class__(
803+
(key, value) for key, value in self.items() if pattern_re.search(key)
804+
)
805805

806806
def copy(self):
807807
"""Copy this RcParams instance."""
808-
rccopy = RcParams()
808+
rccopy = self.__class__()
809809
for k in self: # Skip deprecations and revalidation.
810810
rccopy._set(k, self._get(k))
811811
return rccopy

0 commit comments

Comments
 (0)