Skip to content

pyproject.toml and pyupgrade#705

Open
sakgoyal wants to merge 1 commit intoquodlibet:mainfrom
sakgoyal:main
Open

pyproject.toml and pyupgrade#705
sakgoyal wants to merge 1 commit intoquodlibet:mainfrom
sakgoyal:main

Conversation

@sakgoyal
Copy link

I have changed the PR to be smaller. Now all it does is pyupgrade to at least Python 3.12.

All tests passed on my Windows 11 pc.

Old PR #700

@sakgoyal
Copy link
Author

All I did was run pyupgrade --py312-plus <filename> on the entire project and change the config to pyproject.toml to reduce the file clutter

fix ci

fix flake8
@phw
Copy link
Collaborator

phw commented Feb 23, 2026

For some reason flake8 on the CI is not happy with some changes, not sure why it differs for your local run.

There is also the very similar #690 though, which would move from flake8 to ruff. It needs some rebasing currently.

@lazka What's your take on this? There seems to be quite some demand of modernizing the code base by consistent formatting and adding type hints. There are several issues and PRs that touch this, and I think it totally makes sense.

We recently moved Picard's code formatting to ruff, and I'm very satisfied with it. Would be my personal preference. For type hinting I think having at least the public API part type hinted also will be very useful. I'm not much of a fan of overdoing the type hints in Python, but I have noticed we have been using this more and more in Picard as well whenever we touched parts of the code.

@sakgoyal
Copy link
Author

that's likely because I bumped the mypy version and made it more strict.

I can revert those if you want to make CI happy before accepting the PR

@sakgoyal
Copy link
Author

sorry to bug you again. have you looked into this at all?

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