Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
exclude: ^(scratchpad/)

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.14
- repo: local
hooks:
# Moving ruff hooks to the local version allows for different behavior locally and in ci/cd pipelines.
- id: ruff-format
name: "Ruff formatter"
args: [--config=pyproject.toml]
entry: bash -c 'if [ "$CICD" = "1" ]; then ruff format --check --diff --quiet --config=pyproject.toml "$@"; else ruff format --quiet --config=pyproject.toml "$@"; fi' --
language: system
types_or: [python, jupyter]
- id: ruff
name: "Ruff linter"
args: [--exit-non-zero-on-fix, --fix, --config=pyproject.toml]
entry: bash -c 'if [ "$CICD" = "1" ]; then ruff check --no-fix --show-fixes --quiet --config=pyproject.toml "$@"; else ruff check --exit-non-zero-on-fix --fix --quiet --config=pyproject.toml "$@"; fi' --
language: system
types_or: [python, jupyter]

- repo: local
Expand Down
6 changes: 3 additions & 3 deletions mellea/plugins/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from enum import Enum
from enum import StrEnum
from typing import Any

try:
Expand All @@ -14,7 +14,7 @@
_HAS_PLUGIN_FRAMEWORK = False


class PluginMode(str, Enum):
class PluginMode(StrEnum):
"""Execution modes for Mellea plugins.

Execution order: SEQUENTIAL → TRANSFORM → AUDIT → CONCURRENT → FIRE_AND_FORGET
Expand All @@ -27,7 +27,7 @@ class PluginMode(str, Enum):
FIRE_AND_FORGET = "fire_and_forget"


class HookType(str, Enum):
class HookType(StrEnum):
"""All Mellea hook types.

Hook types are organized by lifecycle stage: session, component,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ all = ["mellea[backends,docling,tools,telemetry,server,sandbox,granite_retriever

# Code quality
lint = [
"ruff>=0.11.6",
"ruff>=0.15.5",
"isort>=6.0.0",
"pre-commit>=4.2.0",
"pylint>=3.3.4",
Expand Down
Loading
Loading