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

python cleanup for 3.11 #415

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

marksmayo
Copy link

  • converted strings to f-strings
  • sorted imports
  • added trailing commas (as per 3.5, 3.6+)
  • fixed some docstrings
  • fixed spacings
  • made some quotes consistent

 - converted strings to f-strings
 - sorted imports
 - added trailing commas (as per 3.5, 3.6+)
 - fixed some docstrings
 - fixed spacings
 - made some quotes consistent
Copy link
Contributor

@hemberger hemberger left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! For my reference, is this the Black autoformatter?

tests/test_browser.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@moy moy left a comment

Choose a reason for hiding this comment

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

I'm normally reluctant to this kind of PR, since it introduces a lot of changes (hence potential Git conflicts) with little added value. But MechanicalSoup is not that active these days, so the probability that another change clashes with this one is low, and we try to be as close as possible to perfection (;-) ) and this patch goes in the right direction.

I didn't have time to make a proper review, though. At least the point raised by Dan needs to be fixed.

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
Copy link
Collaborator

Choose a reason for hiding this comment

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

I disagree with this series of changes. I like the distinction between comments (# like this) and commented-out code (#like = that). No strong opinion, but I'd rather not change things I'm already happy with.

@marksmayo
Copy link
Author

Thanks for the PR! For my reference, is this the Black autoformatter?

I used isort to sort imports, and flake8/pylint to look for issues.

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.

None yet

3 participants