Skip to content

ci, pre-commit: add python style modernizing autoformatter#508

Merged
jcrist merged 2 commits intodask:mainfrom
consideRatio:pr/add-pyupgrade
Mar 27, 2022
Merged

ci, pre-commit: add python style modernizing autoformatter#508
jcrist merged 2 commits intodask:mainfrom
consideRatio:pr/add-pyupgrade

Conversation

@consideRatio
Copy link
Copy Markdown
Collaborator

I see that several projects in the dask organization has adopted use of the pyupgrade pre-commit hook - an autoformatter that modernizes Python syntax based on the minimum Python version specified.

For example, passing the flag --py37-plus to pyupgrade will make it able to assume that we can use f-strings, so it will transition to use those or .format in some cases.

@jcrist jcrist merged commit 112f973 into dask:main Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants