Skip to content
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

Merged
merged 2 commits into from
Dec 10, 2023
Merged

Conversation

fchapoton
Copy link
Contributor

pep8 cleanup for the 2 modified files

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.

@@ -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:]
Copy link
Contributor

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)."

Copy link
Collaborator

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.

Copy link
Collaborator

@kwankyu kwankyu Nov 21, 2023

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 :-)

Copy link
Contributor

@mkoeppe mkoeppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

Copy link

Documentation preview for this PR (built with commit 8d8b28d; changes) is ready! 🎉

@vbraun vbraun merged commit ca0624a into sagemath:develop Dec 10, 2023
18 checks passed
@fchapoton fchapoton deleted the pep8-sympy-axiom branch December 10, 2023 14:02
@mkoeppe mkoeppe added this to the sage-10.3 milestone Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants