Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b81466f

Browse files
committed
Avoid some lookups.
1 parent 88becd0 commit b81466f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

build_docs.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,15 +1023,16 @@ def parse_languages_from_config():
10231023
"""Read config.toml to discover languages to build."""
10241024
config = tomlkit.parse((HERE / "config.toml").read_text(encoding="UTF-8"))
10251025
languages = []
1026+
defaults = config["defaults"]
10261027
for name, section in config["languages"].items():
10271028
languages.append(
10281029
Language(
10291030
name,
10301031
section.get("iso639_tag", name),
10311032
section["name"],
1032-
section.get("in_prod", config["defaults"]["in_prod"]),
1033-
sphinxopts=section.get("sphinxopts", config["defaults"]["sphinxopts"]),
1034-
html_only=section.get("html_only", config["defaults"]["html_only"]),
1033+
section.get("in_prod", defaults["in_prod"]),
1034+
sphinxopts=section.get("sphinxopts", defaults["sphinxopts"]),
1035+
html_only=section.get("html_only", defaults["html_only"]),
10351036
)
10361037
)
10371038
return languages

0 commit comments

Comments
 (0)