Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a new type for the current document's environment state #13151

Merged
merged 16 commits into from
Jan 4, 2025
Prev Previous commit
Next Next commit
fixup! Add autodoc:{class,module}
AA-Turner committed Nov 22, 2024
commit e72a3d7a2950376a23b2de58a7f092a8586d9ded
2 changes: 1 addition & 1 deletion sphinx/ext/autodoc/__init__.py
Original file line number Diff line number Diff line change
@@ -1186,7 +1186,7 @@ def resolve_name(self, modname: str | None, parents: Any, path: str, base: str,
# auto directive ...
mod_cls_ = self.env.current_document.autodoc_class
# ... or from a class directive
if mod_cls_ is None:
if not mod_cls_:
mod_cls_ = self.env.ref_context.get('py:class')
# ... if still None, there's no way to know
if mod_cls_ is None: