Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/update_switcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import os


def main():
def main() -> None:
# Define CLI arguments
parser = argparse.ArgumentParser(description="Update switcher.json")
parser.add_argument(
Expand All @@ -20,7 +20,7 @@ def main():

# Setup path to switcher.json (relative to this script) and load it
switcher_path = os.path.join(os.path.dirname(__file__), "_static", "switcher.json")
with open(switcher_path) as f:
with open(switcher_path, encoding="utf-8") as f:
switcher = json.load(f)

# first we get the version number of the previous version
Expand Down Expand Up @@ -54,7 +54,7 @@ def main():
switcher.insert(latest_index + 1, previous_version_entry)

# Write the updated switcher.json
with open(switcher_path, "w") as f:
with open(switcher_path, "w", encoding="utf-8") as f:
json.dump(switcher, f, indent=2)


Expand Down