diff --git a/lib/matplotlib/style/core.py b/lib/matplotlib/style/core.py index d0592bd32201..1c5a0d25b739 100644 --- a/lib/matplotlib/style/core.py +++ b/lib/matplotlib/style/core.py @@ -33,6 +33,7 @@ def __getattr__(name): if name == "STYLE_FILE_PATTERN": _api.warn_deprecated("3.5", name=name) return re.compile(r'([\S]+).%s$' % STYLE_EXTENSION) + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") BASE_LIBRARY_PATH = os.path.join(mpl.get_data_path(), 'stylelib')