Skip to content

style: adopt the shared ruff standard #344

Closed

Description

@uniqueg

Why?

All FOCA-based apps follow cloud-registry as their template, and FOCA should lint like them. Decided standard for all repos (user, 2026-10-21):

  • ruff rules B C4 D E F G I PL RUF S SIM UP W, with the documented ignores FOCA already has;
  • D (Google convention) everywhere, including tests, docs and examples (FOCA currently excludes them);
  • line length 88 (Black's default; FOCA currently uses 79), ruff format.

Part of FOCA 0.16.0, done first: the reformat would conflict with every other change (user decision, 2026-10-21).

How?

  1. Set line-length = 88 and reformat in one commit, listed in .git-blame-ignore-revs.
  2. Add S (bandit) and G (logging format) and fix findings; tests/** may ignore S101 (assert).
  3. Remove the D per-file ignores for docs/**, examples/** and tests/**, and add the missing docstrings.
  4. Align the mypy settings with cloud-registry's (disallow_untyped_defs, disallow_any_generics, tests included) where they differ.

Acceptance criteria

  • ruff and mypy with the shared settings pass in pre-commit and CI; behaviour unchanged.
  • The reformatting commit is in .git-blame-ignore-revs.

Activity

  1. added
    priority: medium
    status: on hold
    type: style
    workload: days
    on Oct 21, 2026
  2. added
    status: blocked
    status: in progress
    and removed
    status: on hold
    status: blocked
    on Oct 21, 2026
  3. uniqueg commented on Oct 21, 2026

    @uniqueg
    MemberAuthor

    Done in #353 and #358.

  4. removed
    status: in progress
    on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumtype: styleworkload: days

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions