Skip to content

Refactor Python code with Python 3.6+ features#350

Merged
maartenbreddels merged 1 commit intowidgetti:masterfrom
EwoutH:pyupgrade-36
Dec 11, 2023
Merged

Refactor Python code with Python 3.6+ features#350
maartenbreddels merged 1 commit intowidgetti:masterfrom
EwoutH:pyupgrade-36

Conversation

@EwoutH
Copy link
Copy Markdown
Contributor

@EwoutH EwoutH commented Oct 26, 2023

Refactor, cleanup and remove old Python 2 and =<3.5 constructs and replace them with modern Python 3.6+ syntax.

  • Remove the default subclass (object) when defining a class
  • Use New Super syntax (PEP 3135)
  • Define sets with curly braces {} instead of set()
  • Remove forced str("native") literals
  • Replace percent-formatted strings by .format() strings

Used pyupgrade 3.15.0 with --py36-plus as starting point for this PR.

Refactor, cleanup and remove old Python 2 and =<3.5 constructs and replace them with modern Python 3.6+ syntax.

- Remove the default subclass (object) when defining a class
- Use New Super syntax (PEP 3135)
- Define sets with curly braces {} instead of set()
- Remove forced str("native") literals
- Replace percent-formatted strings by .format() strings

Used pyupgrade 3.15.0 with --py36-plus as starting point for this PR.
@EwoutH
Copy link
Copy Markdown
Contributor Author

EwoutH commented Dec 11, 2023

Hi @maartenbreddels!

I was looking though some of my open, inactive PRs, and I was curious if you were interested in this PR.

@maartenbreddels maartenbreddels merged commit 128fb4e into widgetti:master Dec 11, 2023
@maartenbreddels
Copy link
Copy Markdown
Contributor

Thank you 🙏

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