-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Minor improvements #285
base: canon
Are you sure you want to change the base?
Minor improvements #285
Conversation
nbraud
commented
May 28, 2019
- Avoid function calls in default arguments (it has surprising behaviour: the call is only evaluated once)
- Comply with PEP8 code style.
- Remove unused imports and variables.
- Use a uniform import order
- Use trailing commas where useful
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.
Blocking this for now, will discuss tomorrow.
examples/targets.py
Outdated
import ppb | ||
from ppb import Vector | ||
from ppb import keycodes | ||
from ppb import keycodes, Vector |
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.
Prefer one per import per line
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.
FYI, there were already places which had multiple imports per line, and in ppb-vector
too.
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.
Yeah, she and I kinda disagree on that.
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.
OK, so then @pathunstrom, can we agree to disagree, instead of expecting contributors to conform with a styleguide that only exists in your head, that the codebase doesn't comply with, and giving them imperative-mode feedback without explanations?
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.
PS: I just realised the tone might be wrong there; to clarify, I wasn't annoyed at you, though I felt it was important to provide feedback on that being frustrating & why (not necessarily just for me, but also for other contributors), esp. since that's not the first time it happens.
Per Piper's request.