-
Notifications
You must be signed in to change notification settings - Fork 292
CP-47555 Porting usb_scan.py to python3 #5424
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
Merged
liulinC
merged 14 commits into
xapi-project:feature/py3
from
acefei:private/feis/CP-47389_v1
Mar 13, 2024
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5e29ccb
formate with black
acefei c16578d
decode value produced by python3-pyudev which return bytes
acefei 780065b
remove usb_scan from expected_to_fail list in pyproject.toml
acefei 6aef7b2
update some neccesary pylint issues
acefei d302501
fix pytype error: unsupported operand type(s) for +: str and UsbInter…
acefei 57fffaa
Disable false positive in Pytype error reporting
acefei 83b8e24
update for comments
acefei f645d83
fix ut errors as python-pyudev return bytes instead of string
acefei 6e53d0a
increase code coverage
acefei 3450536
format with black for test_usb_scan.py
acefei 3aae700
move usb_scan.py with ut code into python3 folder
acefei 86a772f
Disable the code coverage of scripts folder
acefei 20064e1
false positive for code coverage
acefei 1a34e20
solve the pylint warning
acefei File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
@bernhardkaindl are these safe to disable?
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.
May I have your further feedback to push this review orward?
Uh oh!
There was an error while loading. Please reload this page.
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.
Hi @psafont , as @bernhardkaindl 's previous perspective (#5296 (comment)), he thought those warnings are harmless and even far less of a fixed "problem" that would belong to a Python3 PR.
If enabling these rule, we have to add dozens more lines of changes, and even refactor the logic for some rules, all of which are risky.
Overall, it is fine to disable rules to keep code stable.
Uh oh!
There was an error while loading. Please reload this page.
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.
"unspecified-encoding"is not safe to ignore blindly for all files.The reason is that files can contain UTF-8 characters or even non UTF-8 bytes
> ord(127), that are not valid UTF-8 and this caused crashing the auto-cert-kit Xapi plugin last year:See my review comment #5424 (review) for the further follow-up on this discussion.
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.
Hi @acefei Would you please create a new ticket to track this kind of changes? It would be a good chance to make these potential issues more clear in feature branch.