From 95fb5fdf3a2dc4ea7bdb05d6d85f58152bf753ad Mon Sep 17 00:00:00 2001 From: "Yiges.M.x." <53297280+YigesMx@users.noreply.github.com> Date: Thu, 12 Sep 2024 01:26:02 +0800 Subject: [PATCH] Update plugin.py fix 'DeprecationWarning: Do not access Theme._vars, instead access the keys of Theme directly.' --- src/mkdocs_git_revision_date_localized_plugin/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mkdocs_git_revision_date_localized_plugin/plugin.py b/src/mkdocs_git_revision_date_localized_plugin/plugin.py index 38b747f..f0360c9 100644 --- a/src/mkdocs_git_revision_date_localized_plugin/plugin.py +++ b/src/mkdocs_git_revision_date_localized_plugin/plugin.py @@ -78,7 +78,7 @@ def on_config(self, config: config_options.Config, **kwargs) -> Dict[str, Any]: # theme locale if "theme" in config and "language" in config.get("theme"): custom_theme = config.get("theme") - theme_locale = custom_theme._vars.get("language") + theme_locale = custom_theme["language"] if Version(mkdocs_version) >= Version("1.6.0") else custom_theme._vars.get("language") logging.debug( "Locale '%s' extracted from the custom theme: '%s'" % (theme_locale, custom_theme.name)