You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Whitespace-only RST-like docstring directives crash help parsing #738
A whitespace-only RST-like directive crashes fire.docstrings.parse() instead of remaining ordinary docstring text. This can also prevent Fire from displaying help for a callable with such a docstring.
File "fire/docstrings.py", line 718, in _rst_section
possible_title = directive.split()[0]
IndexError: list index out of range
Expected: return a DocstringInfo whose description preserves : :. The parser documents that it should run without crashing on all strings.
The directive is a nonempty whitespace string, so if directive succeeds, but directive.split() is empty. I intend to submit a focused fix that checks for a directive token before indexing it, with regression tests for space-only and tab-only directives and ordinary RST parameter parsing.
AI disclosure: this report and proposed fix were prepared using OpenAI Codex.
Activity
vaibhavrvalakunde2006-gif commented on Nov 24, 2026
Hi, I'd like to take this one. Are you already working on a PR? If I don't hear back in a couple of days I'll open one with the fix and regression tests.
Activity
vaibhavrvalakunde2006-gif commentedon Nov 24, 2026
Hi, I'd like to take this one. Are you already working on a PR? If I don't hear back in a couple of days I'll open one with the fix and regression tests.