Skip to content

Fix Pyright failure: suppress missing-import for sphinx_autodoc_typehints in docs/source/conf.py #74

@github-actions

Description

@github-actions

Summary

agents/agent1/docs/source/conf.py is included in Pyright's scan (via [tool.pyright].include), but the docs dependency group is excluded from the default poe setup/install. This means Pyright will fail with a reportMissingImports error for sphinx_autodoc_typehints in a fresh dev environment unless the docs group is explicitly installed.

File / Line

  • File: agents/agent1/docs/source/conf.py
  • Line: 52

Original Review Comment

This file is type-checked by Pyright (docs are included), but later it conditionally imports sphinx_autodoc_typehints without a reportMissingImports suppression. Since the default poe setup/install excludes the docs dependency group, Pyright will commonly fail in a fresh dev env unless you either (a) add a Pyright missing-import ignore for that import, (b) exclude docs from Pyright, or (c) install the docs group by default.

Suggested Fix

Choose one of:

  • (a) Add a # type: ignore[import] (or # pyright: ignore[reportMissingImports]) comment on the sphinx_autodoc_typehints import line in conf.py.
  • (b) Exclude docs/ from Pyright's include list in pyproject.toml.
  • (c) Install the docs dependency group by default in the dev setup task.

Context

Related PR: #51
Review comment: #51 (comment)

Generated by PR Review Comment — Create Issue for issue #51

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions