Skip to content

style: adopt the shared ruff, mypy and pre-commit #206

Closed

Description

@uniqueg

Why?

proTES lints with flake8 and pylint, type-checks loosely with mypy (#116), and has no pre-commit hooks, secret scanning or project-specific rules. All FOCA apps share one standard, set by cloud-registry (elixir-cloud-aai/cloud-registry#94, elixir-cloud-aai/cloud-registry#145, elixir-cloud-aai/cloud-registry#162) and FOCA (elixir-cloud-aai/foca#358).

How?

  1. ruff with the shared rule set B C4 D E F G I PL RUF S SIM UP W (and the same ignores as cloud-registry), line length 88, ruff format, Google docstrings everywhere (also tests).
  2. mypy with disallow_untyped_defs, disallow_any_generics, warn_unused_ignores, over pro_tes, tests and scripts; fix all findings (Fix type checker issues #116; FOCA ships type information since 0.14).
  3. .pre-commit-config.yaml as in cloud-registry: pre-commit-hooks, ruff, semgrep with .semgrep/ (flask-debug-enabled, jwt-decode-without-verification), gitleaks (staged and all files), actionlint, local ast-grep (rules foca-config-attribute, pydantic-v1-dict, string-status-code, with rule tests) and mypy hooks; hook revisions pinned to commits.
  4. CI: one "Static code analysis" job running pre-commit (and gitleaks-all); remove flake8, pylint and black.
  5. Reformat in one commit, listed in .git-blame-ignore-revs.

Acceptance criteria

  • pre-commit run --all-files passes locally and in CI, with the shared rule set and strict mypy settings.
  • No flake8, pylint or black configuration is left.

Closes #116.

Activity

  1. added
    priority: medium
    status: blocked
    type: style
    workload: days
    on Oct 22, 2026
  2. added
    status: in progress
    and removed
    status: blocked
    on Oct 22, 2026
  3. added a commit that references this issue on Oct 22, 2026
  4. removed
    status: in progress
    on Oct 22, 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