Skip to content

docs:add missing docstrings to output_engine/__init__.py #3463

@terriko

Description

@terriko

We haven't been entirely consistent about adding python docstrings to every function, and I'd like to start improving the codebase. I'm filing separate tickets for each file I want updated so hacktoberfest folk can claim them more easily -- please only claim one or two at a time.

Here's a tutorial on docstrings in case you're not sure what they are. Basically I want someone to write a short sentence explaining what a function does and have it put at the top of the function in the way that python expects docstrings to look. (You can also do classes and methods.)

This issue is for updating the file foutput_engine/__init__.py. interrogate (a tool for checking docstrings) says it's missing the following docstrings:

------------------------------ Detailed Coverage -------------------------------

Name Status
init.py
output_json (L40) COVERED
save_intermediate (L54) COVERED
output_csv (L77) COVERED
output_pdf (L125) COVERED
output_pdf (L586) MISSED
OutputEngine (L600) MISSED
OutputEngine.output_cves (L655) COVERED
OutputEngine.generate_vex (L737) MISSED
OutputEngine.generate_sbom (L835) MISSED
OutputEngine.output_file_wrapper (L897) MISSED
OutputEngine.output_file (L901) COVERED
OutputEngine.check_file_path (L961) MISSED
OutputEngine.check_dir_path (L970) MISSED
-------------------------------------------------------------- ---------------

You will need to actually read the file and figure out what it does, then describe each function. Feel free to ask questions if you're not sure, or submit a partial fix where you only add docstrings to some functions.

Short tips for new contributors:

  • cve-bin-tool's contributor docs
  • If you've contributed to open source but not this project, you might just want our checklist for a great pull request
  • cve-bin-tool uses https://www.conventionalcommits.org/ style for commit messages, and we have a test that checks the title of your pull request (PR). A good potential title for this one is in the title of this issue.
  • You can make an issue auto close by including a comment "fixes #ISSUENUMBER" in your PR comments where ISSUENUMBER is the actual number of the issue. This "links" the issue to the pull request.

Claiming issues:

  • You do not need to have an issue assigned to you before you work on it. To "claim" an issue either make a linked pull request or comment on the issue saying you'll be working on it.
  • If someone else has already commented or opened a pull request, assume it is claimed and find another issue to work on.
  • If it's been more than 1 week without progress, you can ask in a comment if the claimant is still working on it before claiming it yourself (give them at least 3 days to respond before assuming they have moved on).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions