Don't use is not to compare to literals#3
Merged
nalundgaard merged 4 commits intomasterfrom Mar 4, 2025
Merged
Conversation
This has been a bad-ish idea since python 3.8. Fix is easy enough. Resolves: ``` /mfab/Dockerfiles/deps/PackagesPartsAndPlacements/apps/AnalysisWorker/.venv/lib/python3.11/site-packages/gerber/excellon_statements.py:458: SyntaxWarning: "is not" with a literal. Did you mean "!="? if stmt['xdelta'] is not '' else None) /mfab/Dockerfiles/deps/PackagesPartsAndPlacements/apps/AnalysisWorker/.venv/lib/python3.11/site-packages/gerber/excellon_statements.py:461: SyntaxWarning: "is not" with a literal. Did you mean "!="? if stmt['ydelta'] is not '' else None) /mfab/Dockerfiles/deps/PackagesPartsAndPlacements/apps/AnalysisWorker/.venv/lib/python3.11/site-packages/gerber/excellon_statements.py:609: SyntaxWarning: "is not" with a literal. Did you mean "!="? if stmt['x'] is not '' else None) /mfab/Dockerfiles/deps/PackagesPartsAndPlacements/apps/AnalysisWorker/.venv/lib/python3.11/site-packages/gerber/excellon_statements.py:612: SyntaxWarning: "is not" with a literal. Did you mean "!="? if stmt['y'] is not '' else None) /mfab/Dockerfiles/deps/PackagesPartsAndPlacements/apps/AnalysisWorker/.venv/lib/python3.11/site-packages/gerber/ipc356.py:385: SyntaxWarning: "is not" with a literal. Did you mean "!="? x = int(coord_dict['x']) if coord_dict['x'] is not '' else x /mfab/Dockerfiles/deps/PackagesPartsAndPlacements/apps/AnalysisWorker/.venv/lib/python3.11/site-packages/gerber/ipc356.py:386: SyntaxWarning: "is not" with a literal. Did you mean "!="? y = int(coord_dict['y']) if coord_dict['y'] is not '' else y /mfab/Dockerfiles/deps/PackagesPartsAndPlacements/apps/AnalysisWorker/.venv/lib/python3.11/site-packages/gerber/ipc356.py:415: SyntaxWarning: "is not" with a literal. Did you mean "!="? scale if aperture_dict['x'] is not '' else None /mfab/Dockerfiles/deps/PackagesPartsAndPlacements/apps/AnalysisWorker/.venv/lib/python3.11/site-packages/gerber/ipc356.py:417: SyntaxWarning: "is not" with a literal. Did you mean "!="? scale if aperture_dict['y'] is not '' else None /mfab/Dockerfiles/deps/PackagesPartsAndPlacements/apps/AnalysisWorker/.venv/lib/python3.11/site-packages/gerber/ipc356.py:431: SyntaxWarning: "is not" with a literal. Did you mean "!="? x = int(coord_dict['x']) if coord_dict['x'] is not '' else x /mfab/Dockerfiles/deps/PackagesPartsAndPlacements/apps/AnalysisWorker/.venv/lib/python3.11/site-packages/gerber/ipc356.py:432: SyntaxWarning: "is not" with a literal. Did you mean "!="? y = int(coord_dict['y']) if coord_dict['y'] is not '' else y ```
metacollin
previously approved these changes
Mar 3, 2025
40c81c8 to
b944c9a
Compare
It looks like these have been removed: > Version 3.7 with arch x64 not found > Version 3.8 with arch x64 not found
b944c9a to
70d9dc5
Compare
metacollin
approved these changes
Mar 4, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This has been a bad-ish idea since python 3.8. Fix is easy enough.
Resolves: