Skip to content

Conversation

@kellerza
Copy link
Contributor

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 uv for 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:

  • Upgraded GitHub Actions for checkout and setup-python to version 6, replaced pip with uv for dependency management, and added environment variables for RUFF_VERSION and UV_VERSION in .github/workflows/python-app.yml. The workflows now use uv sync for installing dependencies and uv run for running tools and tests. [1] [2] [3]
  • Enhanced the ruff linting step to run with --fix and specified the version via an environment variable. Proposed, but commented out, a ruff format step as a future replacement for black and pylint.
  • Overhauled .pre-commit-config.yaml to use local hooks running tools via uv, including pyproject-fmt, uv lock, ruff check, and ruff format, removing direct references to upstream repos for black and ruff.

Example and Generator Code Cleanups:

  • Replaced exit() with sys.exit() for more explicit script termination in examples/directory/users/reset_password.py. [1] [2]
  • Removed unnecessary blank lines and standardized loop ranges (e.g., for idx in range(0, n)for idx in range(n)) for consistency in multiple example scripts. [1] [2] [3] [4]
  • Minor whitespace and formatting cleanups in generator and example files for improved readability. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]

These changes collectively improve automation reliability, developer experience, and code consistency across the project.

@vgrem vgrem merged commit 1327b63 into vgrem:py3-migration Jan 14, 2026
@kellerza kellerza deleted the py3-mig branch January 14, 2026 17:32
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