-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Wrong Empty modules section error (regression) #204
Comments
With griffe 0.35.0 (used by mkdocstrings), this line started to fail with an error `Empty modules section at line ...`. For now we are just working around it until the bug is fixed. See: mkdocstrings/griffe#204 Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Thanks for the report! Yes, latest Griffe added support for Modules, Classes, Functions and Methods sections. The parser is a bit too lax, I'll add an option to make it more strict, and we'll add a deprecation period for the default behavior, to switch to strict by default at some point. |
In the end I didn't add an option. I expect most users already use valid syntax for sections. The docs mention a way to find out possibly invalid syntax. Released in v0.35.2. |
Hi @pawamoy , thanks for addressing this so quickly. So it's unclear for me if this is expected behaviour from now on or not. It is now invalid to have just the words Asking to know how should we format our doc comments. Thanks! |
Oh, good question, I guess I could have given more explanations. Your example docstring above is perfectly valid. Before, the parser would parse it as an empty modules section, which was wrong. Now, with our stricter parsing rules, it is correctly parsed as regular text. I hope this answers your question. |
With griffe 0.35.0 (used by mkdocstrings), this line started to fail with an error `Empty modules section at line ...`. For now we are just working around it until the bug is fixed. See: mkdocstrings/griffe#204 Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
With griffe 0.35.0 (used by mkdocstrings), this line started to fail with an error `Empty modules section at line ...`. For now we are just working around it until the bug is fixed. See: mkdocstrings/griffe#204 Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
Yes, crystal clear now! Thanks! |
Describe the bug
This is a regression, it didn't happen with griffe 0.31.0. I'm not using griffe directly, but from mkdocstrings and the dependency was indirectly updated.
Debug logs
No griffe logs.
To Reproduce
Steps to reproduce the behavior:
I hope it is enough to show a public repo with this issue.
You can see a GitHub workflow failing here: https://github.com/frequenz-floss/frequenz-repo-config-python/actions/runs/5980689722/job/16227308937?pr=125
Expected behavior
It should work as before. A paragraph split in more than one line shouldn't be considered a section.
System (please complete the following information):
griffe
version: 0.35.0Additional context
None.
The text was updated successfully, but these errors were encountered: