-
Notifications
You must be signed in to change notification settings - Fork 205
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 bootstrap #2862
Refactor bootstrap #2862
Conversation
ouziel-slama
commented
Dec 17, 2024
•
edited
Loading
edited
- Double-check the spelling and grammar of all strings, code comments, etc.
- Double-check that all code is deterministic that needs to be
- Add tests to cover any new or revised logic
- Ensure that the test suite passes
- Update the project release notes
- Update the project documentation, as appropriate, with a corresponding Pull Request in the Documentation repository
with open(zst_filepath, "rb") as input_file: | ||
pyzstd.decompress_stream(input_file, output_file, read_size=16 * 1024) | ||
os.remove(zst_filepath) | ||
os.chmod(filepath, 0o660) |
Check warning
Code scanning / Bandit
Chmod setting a permissive mask 0o660 on file (filepath). Warning
filepath = os.path.join(data_dir, filename) | ||
with io.open(filepath, "wb") as output_file: | ||
pyzstd.decompress_stream(response, output_file, read_size=16 * 1024) | ||
os.chmod(filepath, 0o660) |
Check warning
Code scanning / Bandit
Chmod setting a permissive mask 0o660 on file (filepath). Warning
# download and decompress .tar.zst file | ||
print(f"Downloading and decompressing {zst_url}...") | ||
start_time = time.time() | ||
response = urllib.request.urlopen(zst_url) # nosec B310 # noqa: S310 |
Check warning
Code scanning / pylint
Consider using 'with' for resource-allocating operations. Warning
|
||
confirmation_message = colored("Continue? (y/N): ", "magenta") | ||
if input(confirmation_message).lower() != "y": | ||
exit() |
Check warning
Code scanning / pylint
Consider using 'sys.exit' instead. Warning
filepath = os.path.join(os.path.dirname(zst_filepath), filename) | ||
with io.open(filepath, "wb") as output_file: | ||
with open(zst_filepath, "rb") as input_file: | ||
pyzstd.decompress_stream(input_file, output_file, read_size=16 * 1024) |
Check warning
Code scanning / pylint
Module 'pyzstd' has no 'decompress_stream' member. Warning
filename = zst_filename.replace(".latest.zst", "") | ||
filepath = os.path.join(data_dir, filename) | ||
with io.open(filepath, "wb") as output_file: | ||
pyzstd.decompress_stream(response, output_file, read_size=16 * 1024) |
Check warning
Code scanning / pylint
Module 'pyzstd' has no 'decompress_stream' member. Warning