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

fix: remaining mypy errors in helper_script.py #2763

Closed
terriko opened this issue Mar 2, 2023 · 3 comments
Closed

fix: remaining mypy errors in helper_script.py #2763

terriko opened this issue Mar 2, 2023 · 3 comments
Labels
good first issue Good for newcomers

Comments

@terriko
Copy link
Contributor

terriko commented Mar 2, 2023

We're partway through an effort to add type checking to our code base and validate it using mypy as a linter, but there's a few files left with errors and it would be nice to fix those. I'm going to file a few separate issues to make it easier for a person to claim a specific file.

cve_bin_tool/helper_script.py:155: error: Argument 1 to "append" of "list" has incompatible type "object"; expected "str"  [arg-type]
cve_bin_tool/helper_script.py:162: error: Unsupported left operand type for - ("object")  [operator]
cve_bin_tool/helper_script.py:164: error: Unsupported left operand type for - ("object")  [operator]
cve_bin_tool/helper_script.py:168: error: Unsupported left operand type for - ("object")  [operator]
cve_bin_tool/helper_script.py:172: error: List item 0 has incompatible type "object"; expected "str"  [list-item]
cve_bin_tool/helper_script.py:172: error: List item 1 has incompatible type "object"; expected "str"  [list-item]
cve_bin_tool/helper_script.py:173: error: Unsupported left operand type for > ("object")  [operator]
cve_bin_tool/helper_script.py:174: error: List item 0 has incompatible type "object"; expected "str"  [list-item]
cve_bin_tool/helper_script.py:174: error: List item 1 has incompatible type "object"; expected "str"  [list-item]
cve_bin_tool/helper_script.py:254: error: Missing return statement  [return]
cve_bin_tool/helper_script.py:261: error: Argument 1 to "db_open_and_get_cursor" of "CVEDB" has incompatible type "HelperScript"; expected "CVEDB"  [arg-type]
cve_bin_tool/helper_script.py:540: error: Incompatible types in assignment (expression has type "ChainMap[str, Any]", variable has type "Dict[str, Any]")  [assignment]

Helpful resources:

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).
  • Right now things marked as "good first issue" are in short supply -- if you've already fixed one and had code merged, please move on to other issues that don't have that flag on them. There's lots!
@terriko terriko added the good first issue Good for newcomers label Mar 2, 2023
@terriko terriko changed the title chore: remaining mypy errors in helper_script.py fix: remaining mypy errors in helper_script.py Mar 2, 2023
@DaduDev
Copy link

DaduDev commented Mar 2, 2023

Assign me with this issue, I'll try my best to solve this issue.

@terriko
Copy link
Contributor Author

terriko commented Mar 2, 2023

@DaduDev we don't generally assign issues here (see the notes in the "claiming issues" section above) but feel free to work on it!

Tengas added a commit to Tengas/Fork.cve-bin-tool that referenced this issue Mar 29, 2023
@terriko
Copy link
Contributor Author

terriko commented Apr 18, 2023

Closing all the mypy issues because I'm not prepared to work on them right now and I don't want new contributors to trip over them first. Some of them have been solved but weren't closed properly, some have open pull requests in progress and will be closed eventually, some could benefit from re-running mypy.

@terriko terriko closed this as completed Apr 18, 2023
terriko added a commit that referenced this issue Sep 21, 2023
Co-authored-by: Terri Oda <terri.oda@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants