Skip to content

Commit

Permalink
refactor: Address mypy type warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
samjwu committed Apr 26, 2024
1 parent 8265763 commit 0cc64d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/rocm_docs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def setup(app: Sphinx) -> dict[str, Any]:
app.add_config_value(
"all_article_info_read_time", default="", rebuild="html", types=str
)
app.add_config_value("article_pages", default=[], rebuild="html", types=Any)
app.add_config_value("article_pages", default=[], rebuild="html", types=list)

# Run before notfound.extension sees the config (default priority(=500))
app.connect("config-inited", _force_notfound_prefix, priority=400)
Expand Down
10 changes: 5 additions & 5 deletions src/rocm_docs/doxygen.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def _run_doxysphinx(
]
if doxyphinx_version.endswith("+tagfile.toc"):
args.append("--tagfile_toc")
args += [app.srcdir, app.outdir, str(doxyfile)]
args += [str(app.srcdir), str(app.outdir), str(doxyfile)]

try:
subprocess.check_call(args, cwd=doxygen_root)
Expand Down Expand Up @@ -215,19 +215,19 @@ def setup(app: Sphinx) -> dict[str, Any]:
app.setup_extension("breathe")

app.add_config_value(
"doxygen_root", ".doxygen", rebuild="", types=[None, str, os.PathLike]
"doxygen_root", ".doxygen", rebuild="", types=[str, os.PathLike]
)
app.add_config_value(
"doxygen_executable",
None,
rebuild="",
types=[None, str, "os.PathLike[Any]"],
types=[str, os.PathLike[Any]],
)
app.add_config_value(
"doxyfile",
lambda config: Path(config.doxygen_root, "Doxyfile"),
rebuild="",
types=[None, str, "os.PathLike[Any]"],
types=[str, os.PathLike[Any]],
)
app.add_config_value(
"doxygen_project",
Expand All @@ -236,7 +236,7 @@ def setup(app: Sphinx) -> dict[str, Any]:
"path": Path(config.doxygen_root, "docBin", "xml"),
},
rebuild="",
types=dict[str, Union[None, str, "os.PathLike[Any]"]],
types=dict[str, Union[str, "os.PathLike[Any]"]],
)
app.add_config_value("doxysphinx_enabled", False, rebuild="", types=bool)
app.add_config_value("doxygen_html", None, rebuild="")
Expand Down
2 changes: 1 addition & 1 deletion src/rocm_docs/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _update_banner(

def _update_theme_options(app: Sphinx) -> None:
theme_opts = get_theme_options_dict(app)
_update_repo_opts(app.srcdir, theme_opts)
_update_repo_opts(str(app.srcdir), theme_opts)

supported_flavors = ["rocm", "local", "rocm-docs-home", "rocm-blogs"]
flavor = theme_opts.get("flavor", "rocm")
Expand Down

0 comments on commit 0cc64d3

Please sign in to comment.