-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
pep8 for axiom and sympy interfaces #36745
Conversation
src/sage/interfaces/axiom.py
Outdated
@@ -458,14 +457,14 @@ def _eval_line(self, line, reformat=True, allow_use_file=False, | |||
return out | |||
# out = out.lstrip() | |||
i = out.find('\n') | |||
out = out[i+1:] | |||
out = out[i + 1:] |
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.
I think this is incorrect per PEP 8 - https://peps.python.org/pep-0008/#pet-peeves
"in a slice the colon acts like a binary operator, and should have equal amounts on either side (treating it as the operator with the lowest priority)."
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.
There is equal amounts of space on either side of :
, namely, zero. I see no problem here.
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.
Ah, you meant
# Correct:
ham[lower+offset : upper+offset]
# Wrong:
ham[lower + offset:upper + offset]
You are right.
But personally I cannot agree with the recommendation. I like the "wrong" format :-)
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.
Otherwise LGTM
Documentation preview for this PR (built with commit 8d8b28d; changes) is ready! 🎉 |
pep8 cleanup for the 2 modified files
📝 Checklist