-
Notifications
You must be signed in to change notification settings - Fork 24
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 Python and Pylint warnings in windows_testing.py #116
Open
gilles-peskine-arm
wants to merge
6
commits into
Mbed-TLS:main
Choose a base branch
from
gilles-peskine-arm:python_is_not
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix Python and Pylint warnings in windows_testing.py #116
gilles-peskine-arm
wants to merge
6
commits into
Mbed-TLS:main
from
gilles-peskine-arm:python_is_not
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It worked as intended because the string is a literal and CPython (which our CI uses) merges string literals at compile time. But it was fragile with respect to code changes or using another Python implementation. This fixes the diagnostic emitted by python when running the script: ``` windows_testing.py:185: SyntaxWarning: "is not" with a literal. Did you mean "!="? if name is not "Results": ``` Signed-off-by: Gilles Peskine <[email protected]>
Fix regex strings missing an r prefix, and a docstring containing what was intended to be a literal backslash. Signed-off-by: Gilles Peskine <[email protected]>
When re-raising an exception, show the original backtrace, independently of any logging. Signed-off-by: Gilles Peskine <[email protected]>
In all of these cases, one test in a series has failed, so we make a note of the failure and continue. Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: Gilles Peskine <[email protected]>
gilles-peskine-arm
added
enhancement
New feature or request
needs: ci
priority-medium
size-xs
Estimated task size: extra small (a few hours at most)
needs: review
needs: reviewer
and removed
needs: ci
labels
Jul 20, 2023
tgonzalezorlandoarm
requested changes
Aug 10, 2023
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.
Very minor comment, LGTM otherwise.
Signed-off-by: Gilles Peskine <[email protected]>
tgonzalezorlandoarm
approved these changes
Aug 10, 2023
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.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
needs: review
needs: reviewer
priority-medium
size-xs
Estimated task size: extra small (a few hours at most)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix a warning that appears whenever running
windows_testing.py
, including in CI logs:Also fix a few things reported by Pylint. I do not try to be exhaustive there, I just fixed some slightly dodgy code and silenced a few warnings for which I could do so quickly and without risk. Passing pylint is out of scope of this pull request.
CI run: