Skip to content

fix(docstrings): add blank line before example #5033

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

Merged
merged 2 commits into from
Apr 24, 2025

Conversation

kehan-zhou
Copy link
Contributor

🛠️ What This Fix Does
Previously, it did not render some docstrings correctly. This was due to missing blank lines between the summary and the Example: section, causing Example: blocks to not display properly in the generated documentation.

This fix adds the required blank line after the summary in affected docstrings, ensuring it renders the examples correctly.

This improves documentation readability and ensures consistency across the project.

📌 Related Issue
Fixes #5032

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

Looks like you've got a couple of flake8 errors:

 cve_bin_tool/cve_scanner.py:67:1: W293 blank line contains whitespace
cve_bin_tool/helper_script.py:218:17: W291 trailing whitespace

Running black on those two files will likely fix it, but I've also manually added fixes that you can probably just accept if you don't have black set up.

More on our linters and how to set them up here if you need it: https://github.com/intel/cve-bin-tool/blob/main/CONTRIBUTING.md#running-linters

@kehan-zhou
Copy link
Contributor Author

I've run black and pushed a new commit to fix the flake8 warnings — thank you for the helpful and friendly review.

@kehan-zhou kehan-zhou requested a review from terriko April 22, 2025 03:35
Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

Looks like this is ready to merge. Thank you again for the fix! (and to @jloehel for pointing out that we needed it)

@terriko terriko merged commit ebc0fdc into intel:main Apr 24, 2025
24 checks passed
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.

docs: The docstring summary is sometimes not separated from attributes, args, examples, ...
2 participants