From 6b2c6ab021f93defcf4f4d76bdee7adc8a2a29c6 Mon Sep 17 00:00:00 2001 From: Romain Deville <code@romaindeville.fr> Date: Fri, 16 Apr 2021 19:25:07 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20Fix=20not=20used=20arguments=20i?= =?UTF-8?q?n=20plugins.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due to error when using `tox` about unused args, remove those args from `set_nav` method in `plugins.py` file. --- docs/_data/plugins.py | 5 ++--- templates/docs/_data/plugins.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/_data/plugins.py b/docs/_data/plugins.py index 2d676be..c3fae71 100644 --- a/docs/_data/plugins.py +++ b/docs/_data/plugins.py @@ -461,7 +461,7 @@ def set_repo_url(env: dict, repo_slug: str) -> None: ) -def set_nav(env: dict, repo_slug: str) -> None: +def set_nav(env: dict) -> None: """Update content of the `nav` key in `env.conf`. Update the value of `nav` key for mkdocs documentation based on (in @@ -473,7 +473,6 @@ def set_nav(env: dict, repo_slug: str) -> None: Arguments: env: Mkdocs macro plugin environment dictionary. - repo_slug: Repo slug or name of the repo folder. """ if "nav" in env.variables and env.variables["nav"]: env.conf["nav"] = env.variables["nav"] @@ -544,7 +543,7 @@ def set_config(env: dict) -> None: set_copyright(env, git_repo) set_repo_name(env, repo_slug) set_repo_url(env, repo_slug) - set_nav(env, repo_slug) + set_nav(env) update_theme(env, repo_slug) if "subrepo" in env.variables: diff --git a/templates/docs/_data/plugins.py b/templates/docs/_data/plugins.py index 2d676be..c3fae71 100644 --- a/templates/docs/_data/plugins.py +++ b/templates/docs/_data/plugins.py @@ -461,7 +461,7 @@ def set_repo_url(env: dict, repo_slug: str) -> None: ) -def set_nav(env: dict, repo_slug: str) -> None: +def set_nav(env: dict) -> None: """Update content of the `nav` key in `env.conf`. Update the value of `nav` key for mkdocs documentation based on (in @@ -473,7 +473,6 @@ def set_nav(env: dict, repo_slug: str) -> None: Arguments: env: Mkdocs macro plugin environment dictionary. - repo_slug: Repo slug or name of the repo folder. """ if "nav" in env.variables and env.variables["nav"]: env.conf["nav"] = env.variables["nav"] @@ -544,7 +543,7 @@ def set_config(env: dict) -> None: set_copyright(env, git_repo) set_repo_name(env, repo_slug) set_repo_url(env, repo_slug) - set_nav(env, repo_slug) + set_nav(env) update_theme(env, repo_slug) if "subrepo" in env.variables: -- GitLab