Skip to content

style: reformat with line length 88 - #353

Merged
uniqueg merged 1 commit into
devfrom
style/line-length-88
Oct 21, 2026
Merged

uniqueg merged 1 commit into
devfrom
style/line-length-88

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Part 1 of #344 (refs #344; a follow-up PR closes it).

  • Set ruff's line-length to 88 (Black's default) and reformat with ruff format. Nothing else changes.
  • The issue asks for the reformat to be one commit listed in .git-blame-ignore-revs. Squash merges create the commit hash only at merge time, so the reformat ships alone here. The follow-up PR adds this PR's squash commit to .git-blame-ignore-revs, together with the rest of style: adopt the shared ruff standard #344: the S and G rules, D for tests/docs/examples, and the mypy settings. That way the ignored commit holds formatting only. style: adopt ruff and pre-commit #267 and chore: ignore ruff reformat in git blame #273 split the same way.

Verification

  • ruff format --check, ruff check, mypy foca: pass
  • Behaviour unchanged by construction: the ASTs of all 39 changed Python files are identical before and after (ast.dump(ast.parse(...)) per file at origin/dev and HEAD); the only other change is line-length in pyproject.toml
  • Full test suite with MongoDB 7.0: 1050 passed on Python 3.13; 1049 passed, 1 skipped on Python 3.10
  • Adversarial and quality reviewer agents: no findings (comment tokens identical and in order across all changed files, no pragma moved, no new implicit string concatenation, no remaining reference to line length 79)
  • CI: all checks pass

Open questions

None.

🤖 Generated with Claude Code

Set ruff's line length to 88 (Black's default), as in the shared ruff
standard of FOCA-based apps, and reformat with ruff format. Formatting
only; no other changes, so that the squashed commit can be listed in
.git-blame-ignore-revs.

Refs #344

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

This formatting-only PR updates Ruff to Black's default 88-character line length and reformats the affected application, example, and test Python files with ruff format; AST comparison, linting, typing, and the full MongoDB-backed test suite confirm that behavior is unchanged.

File-Level Changes

Change Details Files
Standardize Ruff formatting to an 88-character line length across the project without changing executable behavior.
  • Changed Ruff's configured line length from 79 to 88.
  • Applied ruff format to production code, examples, and tests, consolidating or rewrapping lines throughout the changed Python files.
  • Preserved syntax and behavior, verified by identical ASTs for all 39 changed Python files.
pyproject.toml
examples/petstore-access-control/exceptions.py
examples/petstore/controllers.py
foca/api/register_openapi.py
foca/api/service_info.py
foca/config/access.py
foca/config/config_parser.py
foca/errors/exceptions.py
foca/factories/celery_app.py
foca/foca.py
foca/models/config.py
foca/security/access_control/access_control_server.py
foca/security/access_control/enforcement.py
foca/security/access_control/foca_casbin_adapter/adapter.py
foca/security/access_control/foca_casbin_adapter/casbin_rule.py
foca/security/access_control/register_access_control.py
foca/security/auth.py
foca/utils/db.py
foca/utils/logging.py
foca/utils/misc.py
foca/utils/service_info.py
tests/api/test_register_openapi.py
tests/api/test_service_info.py
tests/config/test_config_parser.py
tests/database/test_register_mongodb.py
tests/errors/test_errors.py
tests/examples/test_petstore_access_control.py
tests/factories/test_connexion_app.py
tests/models/test_config.py
tests/security/access_control/foca_casbin_adapter/test_adapter.py
tests/security/access_control/foca_casbin_adapter/test_casbin_rule.py
tests/security/access_control/test_access_control_server.py
tests/security/access_control/test_enforcement.py
tests/security/access_control/test_register_access_control.py
tests/security/access_control/test_register_casbin_enforcer.py
tests/security/test_auth.py
tests/security/test_cors.py
tests/test_foca.py
tests/utils/test_logging.py
tests/utils/test_service_info_utils.py

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2b7882b) to head (334c74a).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #353   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           24        24           
  Lines         1786      1786           
=========================================
  Hits          1786      1786           
Flag Coverage Δ
test_unit 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review October 21, 2026 21:22

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@uniqueg
uniqueg merged commit 8dfb0ca into dev Oct 21, 2026
14 checks passed
@uniqueg
uniqueg deleted the style/line-length-88 branch October 21, 2026 21:38
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.

1 participant