Skip to content

Trailing comments - #5

Merged
pawamoy merged 2 commits into
mkdocstrings:mainfrom
rumpg:trailing-comments
Sep 2, 2026
Merged

Trailing comments#5
pawamoy merged 2 commits into
mkdocstrings:mainfrom
rumpg:trailing-comments

Conversation

@rumpg

@rumpg rumpg commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

For reviewers

  • I did not use AI
  • I used AI and thoroughly reviewed every code/docs change

Description of the change

Adds support for trailing doc comments (on the same line as the attribute assignment).

Assignments spanning multiple lines are not supported.

The PR also contains a fix for the corner case of a file starting with a doc comment, in which case the first line was ignored.

Relevant resources

@pawamoy pawamoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looking good! Just 2 small comments:

Comment thread src/griffe_sphinx/_internal/extension.py Outdated
Comment thread tests/test_extension.py
@rumpg
rumpg force-pushed the trailing-comments branch from e365a6e to df04f83 Compare September 2, 2026 16:16
@pawamoy
pawamoy merged commit d903340 into mkdocstrings:main Sep 2, 2026
1 of 34 checks passed
@rumpg
rumpg deleted the trailing-comments branch September 2, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants