-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Jira V3 - Added missing assert to unit tests #27738
Conversation
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.
nice
return json.loads(f.read()) | ||
|
||
|
||
def util_load_bytes_file(path: str): | ||
with io.open(path, mode='rb') as f: | ||
with open(path, mode='rb') as f: |
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.
the best practice here would be return Path(path).read_bytes()
, but maybe not in this PR.
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.
Can such a suggestion be added using ruff in the pre-commit command?
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.
Yes. For this to happen:
- Add this test to
flake8-use-pathlib
(hope they approve it), let them assign some error code - Use the same error code to suggest this change to Ruff
* Added missing assert to unit tests, and fixed a unit test * Made changes suggested by ruff
* Added missing assert to unit tests, and fixed a unit test * Made changes suggested by ruff
Status
Related Issues
fixes: link to the issue
Description
Added missing assert to unit tests, and fixed a unit test.
Screenshots
Paste here any images that will help the reviewer
Minimum version of Cortex XSOAR
Does it break backward compatibility?
Must have