InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

Run: pyupgrade --py39-plus **/*.py

Open dsully opened this issue 2 years ago • 8 comments
trafficstars

Remove old Python constructs in the code base.

dsully avatar Feb 05 '23 21:02 dsully

Love the stylistic improvements! Thanks for this. Breadth of these changes may require pretty extensive testing... @lstein should we do this now, or as part of the big refactor planned for the nodes epic?

ebr avatar Feb 06 '23 06:02 ebr

Love the stylistic improvements! Thanks for this. Breadth of these changes may require pretty extensive testing... @lstein should we do this now, or as part of the big refactor planned for the nodes epic?

I'm scared of merging all these changes on the eve of a release, so would prefer to do this after 2.3.0 goes out. Accordingly I'm marking this as a draft.

I would also like to implement black and isort processing on all PRs in order to clean up formatting and make it consistent.

lstein avatar Feb 06 '23 15:02 lstein

No problem. I'll rebase after the release is out.

dsully avatar Feb 06 '23 15:02 dsully

No problem. I'll rebase after the release is out.

Following up on this. We currently have a bunch of conflicts so it would be good to resolve and get this merged ASAP. How do you want to split the chore?

lstein avatar Feb 13 '23 14:02 lstein

It's easy enough to just re-run pyupgrade. I'll have time shortly.

dsully avatar Feb 13 '23 14:02 dsully

Indeed! We'll likely have to do this on several of the PRs that are waiting in the wings. Let me try to get them reviewed and merged into main so that we can reduce the number of conflicts that occur.

lstein avatar Feb 13 '23 14:02 lstein

@lstein This is ready to go.

dsully avatar Feb 13 '23 17:02 dsully

Thanks! It's going to go in just before the 2.3.1 release candidate so that it doesn't create a whole bunch of conflicts with other pending PRs.

lstein avatar Feb 13 '23 21:02 lstein

@dsully I made you coauthor of #2819 , which this PR inspired.

lstein avatar Feb 26 '23 18:02 lstein

Thanks @lstein - hope to have more time to contribute soon.

dsully avatar Feb 26 '23 18:02 dsully