Skip to content

Fix a bunch of python lint errors #32951

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
merged 2 commits into from
Jul 17, 2020
Merged

Fix a bunch of python lint errors #32951

merged 2 commits into from
Jul 17, 2020

Conversation

tbkka
Copy link
Contributor

@tbkka tbkka commented Jul 17, 2020

Python 3 lint seems to catch a lot more issues than Python 2 lint.

This PR contains fixes for a number of them. The issues include:

  • Use of l as a variable name. This is easily confused with 1 or I. (Python_lint also complains about O as a variable name for the same reason.)
  • Unused variable names.
  • Missing parentheses in print() statements (these are required in python 3)

@tbkka tbkka requested a review from compnerd July 17, 2020 16:26
@tbkka
Copy link
Contributor Author

tbkka commented Jul 17, 2020

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 4cd0408

@CodaFi
Copy link
Contributor

CodaFi commented Jul 17, 2020

@swift-ci python lint

@CodaFi
Copy link
Contributor

CodaFi commented Jul 17, 2020

./utils/protocol_graph.py:190:9: E128 continuation line under-indented for visual indent

@tbkka
Copy link
Contributor Author

tbkka commented Jul 17, 2020

@swift-ci python lint

1 similar comment
@CodaFi
Copy link
Contributor

CodaFi commented Jul 17, 2020

@swift-ci python lint

@tbkka
Copy link
Contributor Author

tbkka commented Jul 17, 2020

@swift-ci Please test

@tbkka
Copy link
Contributor Author

tbkka commented Jul 17, 2020

@CodaFi There are about a dozen more issues still to be fixed before Python 3 lint is happy with this. Once that's done, it would be great to get the "python lint" CI updated to use Python 3 lint.

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 4cd0408

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 4cd0408

@shahmishal
Copy link
Member

@swift-ci Please test windows

2 similar comments
@shahmishal
Copy link
Member

@swift-ci Please test windows

@shahmishal
Copy link
Member

@swift-ci Please test windows

@tbkka tbkka merged commit 3181dd1 into swiftlang:master Jul 17, 2020
@tbkka tbkka deleted the tbkka/py3d branch October 16, 2020 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants