Skip to content

Commit ac6143f

Browse files
added docstring
1 parent 18c35b2 commit ac6143f

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

sphinx_versioned/build.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,16 @@ class VersionedDocs:
2424
2525
Parameters
2626
----------
27+
chdir : :class:`str`
28+
chdir location
29+
local_conf : :class:`str`
30+
Location for sphinx `conf.py`.
31+
output_dir : :class:`str`
32+
Documentation output directory.
33+
git_root : :class:`str`
34+
If git root differs from chdir/CWD, that location can be supplied via this variable.
2735
config : :class:`dict`
36+
CLI configuration arguments.
2837
"""
2938

3039
def __init__(self, chdir: str, local_conf: str, output_dir: str, git_root: str, config: dict) -> None:
@@ -77,7 +86,8 @@ def __init__(self, chdir: str, local_conf: str, output_dir: str, git_root: str,
7786
print(f"\n\033[92m Successfully built {', '.join([x.name for x in self._built_version])} \033[0m")
7887
return
7988

80-
def read_conf(self, config) -> bool:
89+
def read_conf(self) -> bool:
90+
"""Read and parse `conf.py`, CLI arugments to make a master config."""
8191
if self.local_conf.name != "conf.py":
8292
self.local_conf = self.local_conf / "conf.py"
8393

@@ -93,10 +103,10 @@ def read_conf(self, config) -> bool:
93103
sv_conf_values = {
94104
x.replace("sv_", ""): y for x, y in self._sphinx_conf._raw_config.items() if x.startswith("sv_")
95105
}
96-
log.error(sv_conf_values)
97-
log.critical(config)
106+
log.debug(f"Configuration file arugments: {sv_conf_values}")
98107

99-
master_config = config.copy()
108+
# Make a master config variable
109+
master_config = self.config.copy()
100110
for x, y in master_config.items():
101111
if y or x not in sv_conf_values:
102112
continue

0 commit comments

Comments
 (0)