Skip to content
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

docs: add missing docstrings to log.py #3383

Closed
terriko opened this issue Oct 4, 2023 · 6 comments · Fixed by #3388
Closed

docs: add missing docstrings to log.py #3383

terriko opened this issue Oct 4, 2023 · 6 comments · Fixed by #3388
Assignees
Labels
documentation Documentation changes good first issue Good for newcomers hacktoberfest good issue for hacktoberfest participation

Comments

@terriko
Copy link
Contributor

terriko commented Oct 4, 2023

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 log.py. interrogate (a tool for checking docstrings) says it's missing the following docstrings:

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

Name Status
log.py
LevelFilter (L12) MISSED
LevelFilter.filter (L17) 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).
@terriko terriko added good first issue Good for newcomers documentation Documentation changes hacktoberfest good issue for hacktoberfest participation labels Oct 4, 2023
@NabhiA
Copy link
Contributor

NabhiA commented Oct 4, 2023

Hello @terriko , hope you are doing well. It will be really helpful if you can help me with a few questions because I am new to this. If I am understanding correctly I need to add the docstrings for L12 and L17, so do I need to give a descriptive one or a simple single line would work ?

@terriko
Copy link
Contributor Author

terriko commented Oct 4, 2023

Since these are very simple, I think a one-liner would suffice, but you can be more explicit if you'd like. There may already be comment text in the file you can move/re-use.

@NabhiA
Copy link
Contributor

NabhiA commented Oct 4, 2023

Ok thank you very much. I will start working on it

@SuryaCreatX
Copy link

Please assign me this issue?

@NabhiA
Copy link
Contributor

NabhiA commented Oct 9, 2023 via email

@terriko
Copy link
Contributor Author

terriko commented Oct 11, 2023

@SuryaCreatX if you're still looking for an issue to work on, I added a few new ones today that (as of right now) haven't been claimed by anyone: #3409 and #3410

terriko pushed a commit that referenced this issue Oct 12, 2023
* Fix: add missing docstrings to log.py #3383
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation changes good first issue Good for newcomers hacktoberfest good issue for hacktoberfest participation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants