Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Apply uv & ruff formatting
Discussed in #998
Co-pilot
This pull request primarily modernizes and streamlines the project's Python workflow automation and developer tooling. The most significant updates are to the GitHub Actions workflows and pre-commit hooks, focusing on upgrading actions, introducing
uvfor dependency management, and consolidating linting and formatting steps. Additionally, there are minor code cleanups and consistency improvements throughout the example and generator files.CI/CD and Developer Tooling Modernization:
checkoutandsetup-pythonto version 6, replaced pip withuvfor dependency management, and added environment variables forRUFF_VERSIONandUV_VERSIONin.github/workflows/python-app.yml. The workflows now useuv syncfor installing dependencies anduv runfor running tools and tests. [1] [2] [3]rufflinting step to run with--fixand specified the version via an environment variable. Proposed, but commented out, aruff formatstep as a future replacement forblackandpylint..pre-commit-config.yamlto use local hooks running tools viauv, includingpyproject-fmt,uv lock,ruff check, andruff format, removing direct references to upstream repos forblackandruff.Example and Generator Code Cleanups:
exit()withsys.exit()for more explicit script termination inexamples/directory/users/reset_password.py. [1] [2]for idx in range(0, n)→for idx in range(n)) for consistency in multiple example scripts. [1] [2] [3] [4]These changes collectively improve automation reliability, developer experience, and code consistency across the project.