Skip to content

Upgrade formatters#261

Open
daniel-montanari wants to merge 9 commits into
PyFixate:mainfrom
daniel-montanari:upgrade-formatter
Open

Upgrade formatters#261
daniel-montanari wants to merge 9 commits into
PyFixate:mainfrom
daniel-montanari:upgrade-formatter

Conversation

@daniel-montanari

Copy link
Copy Markdown
Collaborator

Black was on V22 which can't parse newer python syntax.
Sync formatting with pre-commit.

@daniel-montanari

Copy link
Copy Markdown
Collaborator Author

I'm seeing a lot of deprecation warnings coming from pre-commit actions. I think its probably simpler to just manually bump both pre-commit and tox to use the same newer version of black.

@daniel-montanari daniel-montanari marked this pull request as ready for review June 18, 2026 03:52
@daniel-montanari

daniel-montanari commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator Author

So I did this without seeing #214 (comment)

Can delete this if you like. It might be a pain to merge in and not worth it.

@jcollins1983

jcollins1983 commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

I definitely don't want to keep black in tox. If we're going to have anything in tox, I would prefer it be a pre-commit call so that there is only one place to update the version (.pre-commit-config.yaml) . As I mentioned in this comment I didn't do this because I would personally prefer to defer changes to code to when there are actual modifications being done, but also happy include calls to pre-commit in tox and/or the workflows and just wear the extra overhead in reviewing the formatting changes that are extraneous to the real change being reviewed at the time, that we the entire codebase remains compliant to the version of the formatter currently in use.

@jcollins1983 jcollins1983 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It looks ok, though I don't think we need to use an action for pre-commit. If we use a tox environment, we will be able to run pre-commit alongside all other tests just by running tox. Though anyone making changes should really have the pre-commit hook installed anyway.
And it means that everything is still contained in the tox.ini as far as what is running without having to refer to the CI setup.

If you want to push ahead with the changes as they are, can you please delete the reference to black in the envlist in tox.ini file?

Comment thread tox.ini Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You've left the black environment there.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah just realised, removed.

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