-
Notifications
You must be signed in to change notification settings - Fork 3
Update README.md with comprehensive documentation #4
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| def ensure_folder(path): | ||
| """Ensure that a folder exists.""" | ||
| path.parent.mkdir(parents=True, exist_ok=True) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (bug_risk): Changing to path.mkdir may break cases where 'path' is a file path, not a directory. If ensure_folder receives a file path, this change will create a directory with the file's name, which may not be intended. Confirm that ensure_folder is only called with directory paths to avoid potential bugs. |
||
| path.mkdir(parents=True, exist_ok=True) | ||
|
|
||
|
|
||
| def from_pb_param(data): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (bug_risk): Consider handling potential race conditions when removing the directory.
Another process could modify the directory between the is_dir() check and rmtree(), causing exceptions. Consider wrapping rmtree in a try/except for FileNotFoundError or OSError to handle this safely.