Skip to content

Commit bb3fc70

Browse files
committed
pre-commit
1 parent c69cc2c commit bb3fc70

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

.github/pages/make_switcher.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,15 @@ def get_versions(ref: str, add: str | None) -> list[str]:
5858
def write_json(path: Path, repository: str, versions: list[str]):
5959
"""Write the JSON switcher to path."""
6060
org, repo_name = repository.split("/")
61-
struct = [
62-
{"version": version, "url": f"https://{org}.github.io/{repo_name}/{version}/"}
63-
for version in versions
64-
]
61+
struct = [{"version": version, "url": f"https://{org}.github.io/{repo_name}/{version}/"} for version in versions]
6562
text = json.dumps(struct, indent=2)
6663
print(f"JSON switcher:\n{text}")
6764
path.write_text(text, encoding="utf-8")
6865

6966

7067
def main(args=None):
7168
"""Parse args and write switcher."""
72-
parser = ArgumentParser(
73-
description="Make a versions.json file from gh-pages directories"
74-
)
69+
parser = ArgumentParser(description="Make a versions.json file from gh-pages directories")
7570
parser.add_argument(
7671
"--add",
7772
help="Add this directory to the list of existing directories",

0 commit comments

Comments
 (0)