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

Run pyupgrade, flynt, autoflake, remove six dependency #877

Merged
merged 6 commits into from
Nov 15, 2022

Conversation

akx
Copy link
Contributor

@akx akx commented Oct 27, 2022

Description

The feature or problem addressed by this PR

The repo could use modern (Python 3.6+) features more.

What your changes do and why you chose this solution

Hot on the heels of #873, which switched the repo to modern formatting...

Ran three mechanical tools:

  • pyupgrade to fix "legacy Pythonisms"
  • autoflake to remove unused imports (either left behind by pyupgrade, or otherwise unused)
  • flynt, to fix non-f-string string formatting
  • flynt -tc, to fix string concatenation too (which is more intrusive and could be unsafe, but tests should catch things)

Then followed up with some manual cleaning.

Checklist

  • Checked that no other issues or pull requests exist for the same issue/change
  • Added tests covering the new functionality
  • Updated documentation OR the change is too minor to be documented
  • Updated CHANGELOG.md OR changes are insignificant

@akx akx marked this pull request as draft October 27, 2022 12:02
@akx akx changed the title Run pyupgrade and flynt Run pyupgrade, flynt, autoflake, remove six dependency Oct 27, 2022
@akx akx marked this pull request as ready for review October 27, 2022 12:25
@c00kiemon5ter
Copy link
Member

Hello and thanks for this. I merged another PR so this now has a few conflicts but should be super easy to fix. I will try to go through this and merge asap.
Thanks for pointing out new tools, maybe those can become part of the linting/re-formatting processes we have.

@akx
Copy link
Contributor Author

akx commented Oct 28, 2022

@c00kiemon5ter I can take a look at the conflicts, no worries!

In case you're interested, I'm invested in this repo since the other SAML toolkit for Python seems to be going the way of the dodo... SAML-Toolkits/python3-saml#320

@akx
Copy link
Contributor Author

akx commented Oct 28, 2022

Oh and re

Thanks for pointing out new tools, maybe those can become part of the linting/re-formatting processes we have.

yep – these are super easy to integrate with pre-commit :)

@c00kiemon5ter c00kiemon5ter merged commit 7329c6e into IdentityPython:master Nov 15, 2022
@c00kiemon5ter
Copy link
Member

Thank you @akx - this is now merged.

@g-as g-as mentioned this pull request Nov 15, 2022
4 tasks
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.

2 participants