Repository navigation
style: reformat with ruff - #227
Merged
Merged
Conversation
Format all Python code with ruff format, line length 88, as in cloud-registry and FOCA; strip trailing whitespace and end files with one newline, as the pre-commit hooks of the shared standard will require. Only formatting changes, so that the commit can be ignored by git blame; the shared lint rules, strict mypy and pre-commit follow separately. Vendored GA4GH specifications are kept as published; the README, docs and community files are left to the docs work. flake8 accepts the line length and slice spacing of ruff format until ruff replaces it. Refs #206 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideThis formatting-only PR introduces the Ruff formatter configuration and applies it across Python sources and tests, while normalizing whitespace/newlines in selected deployment and API files and updating flake8 compatibility settings; no intentional runtime or API behavior changes are included. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
uniqueg
marked this pull request as ready for review
October 22, 2026 19:22
This was referenced Oct 22, 2026
uniqueg
added a commit
that referenced
this pull request
Oct 22, 2026
* style: reformat with ruff Format all Python code with ruff format, line length 88, as in cloud-registry and FOCA; strip trailing whitespace and end files with one newline, as the pre-commit hooks of the shared standard will require. Only formatting changes, so that the commit can be ignored by git blame; the shared lint rules, strict mypy and pre-commit follow separately. Vendored GA4GH specifications are kept as published; the README, docs and community files are left to the docs work. flake8 accepts the line length and slice spacing of ruff format until ruff replaces it. Refs #206 Co-Authored-By: Claude Opus 5.5 <[email protected]> * style: adopt the shared ruff, mypy and pre-commit Adopt the standard shared by FOCA and FOCA apps, as in cloud-registry: ruff with the rule set B C4 D E F G I PL RUF S SIM UP W and Google docstrings everywhere; strict mypy (disallow_untyped_defs, disallow_any_generics, warn_unused_ignores) over pro_tes and tests; pre-commit with pre-commit-hooks, ruff, semgrep (Flask debug mode, unverified JWTs), gitleaks, actionlint, ast-grep (untyped FOCA config access, Pydantic v1 dict(), string status codes) and mypy. Remove flake8, pylint and their settings. Fix the findings: lazy logging arguments, explicit errors instead of asserts in app code, request timeouts in the integration tests, docstrings of the TES models, complete type hints. get_task() had the type str as the default of its task identifier. tests/unitTest is excluded until #207 fixes or removes it. List the reformat (#227) in .git-blame-ignore-revs, and fix the file ends and trailing whitespace of docs/middleware.md and docs/images/overview.svg, which the reformat left to the docs work. CI runs pre-commit in one "Static code analysis" job; actions are pinned to commits, runs of a pull request are cancelled when superseded, and jobs have timeouts. Closes #206 Closes #116 Co-Authored-By: Claude Opus 5.5 <[email protected]> * style: remove pylint comments pylint is replaced by ruff, whose PL rules need none of the suppressions. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: address review of the shared standard Quote $GITHUB_ENV, which shellcheck (via actionlint) flags on the runners. A request whose JSON body the middlewares removed is a server fault (MiddlewareException, 500), not a bad request. Tasks without logs fail loudly again when the forward is recorded, instead of the forward being dropped. Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs: document errors for tasks without logs Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs: describe the pre-commit checks Replace flake8 and pylint in the development docs with the pre-commit workflow, as in cloud-registry. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Oct 22, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Part 1 of #206 (refs, does not close it). This PR only reformats. The second PR adopts the shared ruff rules, strict mypy and pre-commit, and lists this PR's squash commit in
.git-blame-ignore-revs. FOCA did the same in two PRs (elixir-cloud-aai/foca#353, then elixir-cloud-aai/foca#358). With squash merges, the reformat needs its own commit ondevbeforegit blamecan ignore it.Changes:
ruff format(line length 88,target-version = "py310") on all Python code, includingtests/unitTest.pro_tes/api/middleware_management.yaml.README.md,docs/**and the community files, which the docs work handles..flake8) until style: adopt the shared ruff, mypy and pre-commit #206 replaces flake8. One pylint disable comment moved to the line it belongs to, after the reformat split the signature.Light lane: formatting only, no logic changes; verified with the existing linters and tests below.
How it was verified
ruff format --check .: all files formatted.flake8 pro_tes: clean.pylint pro_tes: 10.00/10.mypy pro_tes: no issues.pytest tests --ignore=tests/unitTest --ignore=tests/test_integration: 41 passed.Declined review findings
None.
Open questions
None.
🤖 Generated with Claude Code
Summary by Sourcery
Apply consistent Ruff formatting and whitespace normalization without changing application behavior.
Enhancements:
Build:
Chores: