Skip to content

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
@fchapoton fchapoton deleted the pep8-sympy-axiom branch December 10, 2023 14:02
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