Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

[pyupgrade] groups/, federation/, events/, and crypto/ #9749

Conversation

ShadowJonathan
Copy link
Contributor

@ShadowJonathan ShadowJonathan commented Apr 5, 2021

Part of #9744

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
  • Pull request includes a sign off
  • Code style is correct (run the linters)

Signed-off-by: Jonathan de Jong <[email protected]>

@@ -0,0 +1 @@
Run `pyupgrade --py36-plus` over the codebase.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This'll be the newsfile that i will use across all pyupgrade PRs, any adjustments?

@ShadowJonathan ShadowJonathan marked this pull request as ready for review April 5, 2021 16:15
@ShadowJonathan
Copy link
Contributor Author

I'm opening this one - the smallest PR out of the bunch - first, so that any misunderstandings and gotchas can be caught on this one first, before they'd happen across other PRs.

@clokep
Copy link
Member

clokep commented Apr 5, 2021

Just to reconfirm, this is equivalent to running pyupgrade --py36-plus synapse/groups synapse/federation synapse/events synapse/crypto? I.e. all changes are automated from pyupgrade?

@ShadowJonathan
Copy link
Contributor Author

Yes, though it's more akin to running find $1 -type f -name "*.py" on each, as the command doesn't recurse into directories (many PRs requesting such feature nonwithstanding)

I also ran scripts-dev/lint.sh after it, and some complaints from that weren't automatically fixed (# of empty lines before class declarations with comments) on some of the other PRs, but yes, every change is automated.

@ShadowJonathan ShadowJonathan marked this pull request as draft April 6, 2021 12:57
@ShadowJonathan
Copy link
Contributor Author

Closed in favour of better refactoring methodology, see #9744

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants