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

Fix regression in autodoc.Documenter.parse_name #11613

Merged
merged 4 commits into from Aug 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -4,6 +4,7 @@ Release 7.2.3 (in development)
Bugs fixed
----------

* Fix regression in ``autodoc.Documenter.parse_name()``.

Release 7.2.2 (released Aug 17, 2023)
=====================================
Expand Down
8 changes: 3 additions & 5 deletions sphinx/ext/autodoc/__init__.py
Expand Up @@ -383,14 +383,12 @@ def parse_name(self) -> bool:
# first, parse the definition -- auto directives for classes and
# functions can contain a signature which is then used instead of
# an autogenerated one
try:
matched = py_ext_sig_re.match(self.name)
assert matched is not None
explicit_modname, path, base, tp_list, args, retann = matched.groups()
except AttributeError:
matched = py_ext_sig_re.match(self.name)
if matched is None:
logger.warning(__('invalid signature for auto%s (%r)') % (self.objtype, self.name),
type='autodoc')
return False
explicit_modname, path, base, tp_list, args, retann = matched.groups()

# support explicit module and class name separation via ::
if explicit_modname is not None:
Expand Down