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

refactor: use pathlib in sbom_manager/__init__.py #1985

Closed
terriko opened this issue Sep 29, 2022 · 1 comment · Fixed by #2013
Closed

refactor: use pathlib in sbom_manager/__init__.py #1985

terriko opened this issue Sep 29, 2022 · 1 comment · Fixed by #2013
Labels
good first issue Good for newcomers hacktoberfest good issue for hacktoberfest participation

Comments

@terriko
Copy link
Contributor

terriko commented Sep 29, 2022

We're partway through a migration from the older os.path method of handling filesystem paths to the newer Pathlib style, and have a number of files that need updating. I'm filing a separate bug for each so folk doing hacktoberfest can grab one and go really quickly and hopefully so people won't wind up doing too much overlapping work and people can indicate they're working on one by commenting on it.

Basically, the task is to search through the file for the string os.path and replace whatever's there with the equivalent Pathlib construction.

Here's a quick grep on the file to show you what probably needs to be changed:

cve_bin_tool/sbom_manager/__init__.py:            if os.path.exists(self.filename):

Don't forget to remove any imports that are no longer needed when you're done! (you can use flake8 to check for those).

@terriko terriko added good first issue Good for newcomers hacktoberfest good issue for hacktoberfest participation labels Sep 29, 2022
gulyapulya added a commit to gulyapulya/cve-bin-tool that referenced this issue Sep 30, 2022
@gulyapulya
Copy link
Contributor

Hi, my previous issue got taken, so I decided to work on this one instead. Thanks.

terriko added a commit that referenced this issue Oct 7, 2022
* Fixes #1985

* fix: sort imports for isort

Co-authored-by: Terri Oda <[email protected]>
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 hacktoberfest good issue for hacktoberfest participation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants