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
30 changes: 15 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:

jobs:
python-tests:
name: Python Tests (3.13)
name: Python Tests (3.14)
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.13']
python-version: ['3.14']

steps:
- uses: actions/checkout@v4
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.9.8"
version: "0.11.2"
enable-cache: true

- name: Set up Node.js 24
Expand Down Expand Up @@ -69,15 +69,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.13
- name: Set up Python 3.14
uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: '3.14'

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.9.8"
version: "0.11.2"
enable-cache: true

- name: Set up Node.js ${{ matrix.node-version }}
Expand Down Expand Up @@ -147,15 +147,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.13
- name: Set up Python 3.14
uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: '3.14'

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.9.8"
version: "0.11.2"
enable-cache: true

- name: Set up Node.js 24
Expand Down Expand Up @@ -192,15 +192,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.13
- name: Set up Python 3.14
uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: '3.14'

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.9.8"
version: "0.11.2"
enable-cache: true

- name: Set up Node.js 24
Expand Down Expand Up @@ -247,15 +247,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.13
- name: Set up Python 3.14
uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: '3.14'

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.9.8"
version: "0.11.2"
enable-cache: true

- name: Set up Node.js 24
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.11.0
24.14.1
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.13
3.14
6 changes: 3 additions & 3 deletions analyzer/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ exclude = [
".pytest_cache",
]

# Python 3.13+ required
target-version = "py313"
# Python 3.14+ required
target-version = "py314"

# Line length limit (88 chars is Black default)
line-length = 88

[tool.ruff.lint]
# Enable comprehensive rule set for modern Python 3.13+
# Enable comprehensive rule set for modern Python 3.14+
#
# Rule Groups:
# E: pycodestyle errors (PEP 8 violations)
Expand Down
2 changes: 1 addition & 1 deletion analyzer/src/audit/quality_rater.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def load_audit_results(audit_file: Path | None = None) -> AuditResult:
with audit_file.open() as f:
data = json.load(f)
return AuditResult(ratings=data.get("ratings", {}))
except (OSError, json.JSONDecodeError):
except OSError, json.JSONDecodeError:
# If file is corrupted, start fresh
return AuditResult(ratings={})

Expand Down
4 changes: 2 additions & 2 deletions analyzer/src/models/audit_session_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def to_dict(self) -> dict[str, Any]:
}

@classmethod
def from_dict(cls, data: dict[str, Any]) -> "AuditSessionState":
def from_dict(cls, data: dict[str, Any]) -> AuditSessionState:
"""Create from JSON-deserialized dict.

Args:
Expand Down Expand Up @@ -103,7 +103,7 @@ def create_initial(
items: list[Any],
file_snapshot: dict[str, FileSnapshot],
config: dict[str, Any],
) -> "AuditSessionState":
) -> AuditSessionState:
"""Create initial session state at start of audit.

Args:
Expand Down
4 changes: 2 additions & 2 deletions analyzer/src/models/improve_session_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def to_dict(self) -> dict[str, Any]:
}

@classmethod
def from_dict(cls, data: dict[str, Any]) -> "ImproveSessionState":
def from_dict(cls, data: dict[str, Any]) -> ImproveSessionState:
"""Create from JSON-deserialized dict.

Args:
Expand Down Expand Up @@ -111,7 +111,7 @@ def create_initial(
items: list[Any],
file_snapshot: dict[str, FileSnapshot],
config: dict[str, Any],
) -> "ImproveSessionState":
) -> ImproveSessionState:
"""Create initial session state at start of improve workflow.

Args:
Expand Down
8 changes: 4 additions & 4 deletions analyzer/src/models/workflow_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def to_dict(self) -> dict:
}

@staticmethod
def from_dict(data: dict) -> "CommandState":
def from_dict(data: dict) -> CommandState:
"""Create CommandState from dictionary."""
return CommandState(
timestamp=data["timestamp"],
Expand All @@ -35,7 +35,7 @@ def from_dict(data: dict) -> "CommandState":
)

@staticmethod
def create(item_count: int, file_checksums: dict[str, str]) -> "CommandState":
def create(item_count: int, file_checksums: dict[str, str]) -> CommandState:
"""Create a new CommandState with current timestamp."""
return CommandState(
timestamp=datetime.now(UTC).isoformat().replace("+00:00", "Z"),
Expand Down Expand Up @@ -75,7 +75,7 @@ def to_dict(self) -> dict:
}

@staticmethod
def from_dict(data: dict) -> "WorkflowState":
def from_dict(data: dict) -> WorkflowState:
"""Create WorkflowState from dictionary."""
return WorkflowState(
schema_version=data["schema_version"],
Expand All @@ -95,7 +95,7 @@ def from_dict(data: dict) -> "WorkflowState":
)

@staticmethod
def create_empty() -> "WorkflowState":
def create_empty() -> WorkflowState:
"""Create an empty workflow state."""
return WorkflowState(
schema_version="1.0",
Expand Down
2 changes: 1 addition & 1 deletion analyzer/src/models/workflow_state_migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def to_dict(self) -> dict[str, str]:
}

@classmethod
def from_dict(cls, data: dict[str, str]) -> "MigrationLogEntry":
def from_dict(cls, data: dict[str, str]) -> MigrationLogEntry:
"""Create from dictionary (JSON deserialization)."""
return cls(
from_version=data["from"],
Expand Down
2 changes: 1 addition & 1 deletion analyzer/src/planning/plan_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class PlanItem:
reason: str

@classmethod
def from_code_item(cls, item: CodeItem, reason: str) -> "PlanItem":
def from_code_item(cls, item: CodeItem, reason: str) -> PlanItem:
"""Create a PlanItem from a CodeItem.

Args:
Expand Down
2 changes: 1 addition & 1 deletion analyzer/src/utils/file_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def to_dict(self) -> dict[str, Any]:
}

@classmethod
def from_dict(cls, data: dict[str, Any]) -> "FileSnapshot":
def from_dict(cls, data: dict[str, Any]) -> FileSnapshot:
"""Create from JSON-deserialized dict."""
return cls(
filepath=data["filepath"],
Expand Down
2 changes: 1 addition & 1 deletion analyzer/src/utils/session_state_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def list_sessions(session_type: str) -> list[dict[str, Any]]:
with file_path.open(encoding="utf-8") as f:
session = json.load(f)
sessions.append(session)
except (json.JSONDecodeError, OSError):
except json.JSONDecodeError, OSError:
# Skip corrupted or unreadable files
continue

Expand Down
10 changes: 5 additions & 5 deletions analyzer/src/writer/transaction_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from dataclasses import asdict, dataclass, field
from pathlib import Path
from typing import TYPE_CHECKING, Optional
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from src.utils.git_helper import GitTimeoutConfig
Expand Down Expand Up @@ -138,7 +138,7 @@ def __init__(
self,
base_path: Path | None = None,
use_git: bool = True,
timeout_config: Optional["GitTimeoutConfig"] = None,
timeout_config: GitTimeoutConfig | None = None,
):
"""Initialize TransactionManager with optional git support and timeout config.

Expand Down Expand Up @@ -578,7 +578,7 @@ def _parse_commit_to_entry(
if line.startswith("Metadata-Version:"):
try:
metadata_version = int(line.split(":", 1)[1].strip())
except (ValueError, IndexError):
except ValueError, IndexError:
logger.warning(
f"Malformed Metadata-Version in commit "
f"{commit_sha[:GIT_SHORT_SHA_LENGTH]}, defaulting to 0"
Expand Down Expand Up @@ -776,7 +776,7 @@ def rollback_change(self, entry_id: str) -> RollbackResult:
return self._rollback_from_in_progress_session(manifest, entry, entry_id)

def _rollback_from_committed_session(
self, manifest: "TransactionManifest", entry: "TransactionEntry", entry_id: str
self, manifest: TransactionManifest, entry: TransactionEntry, entry_id: str
) -> RollbackResult:
"""Handle re-squash strategy for committed sessions.

Expand Down Expand Up @@ -1010,7 +1010,7 @@ def _rollback_from_committed_session(
raise ValueError(f"Failed to rollback change: {str(e)}")

def _rollback_from_in_progress_session(
self, manifest: "TransactionManifest", entry: "TransactionEntry", entry_id: str
self, manifest: TransactionManifest, entry: TransactionEntry, entry_id: str
) -> RollbackResult:
"""Handle simple revert for in-progress sessions.

Expand Down
6 changes: 3 additions & 3 deletions analyzer/tests/test_git_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def test_very_long_filenames(self):
manager.record_write(
manifest, str(test_file), backup_path, "foo", "function", "python"
)
except (OSError, subprocess.CalledProcessError, ValueError):
except OSError, subprocess.CalledProcessError, ValueError:
# Acceptable to fail on very long filenames, but should not crash
pass

Expand Down Expand Up @@ -431,7 +431,7 @@ def test_git_detached_head_state(self):
manager.commit_transaction(manifest2)
# If it works, verify it committed
assert manifest2.status == "committed"
except (subprocess.CalledProcessError, RuntimeError):
except subprocess.CalledProcessError, RuntimeError:
# Acceptable to fail in detached HEAD - just verify it fails cleanly
pass

Expand Down Expand Up @@ -481,6 +481,6 @@ def test_concurrent_session_safety(self):
# If both succeed, verify both manifests are marked committed
assert manifest1.status == "committed"
assert manifest2.status == "committed"
except (subprocess.CalledProcessError, RuntimeError):
except subprocess.CalledProcessError, RuntimeError:
# Acceptable to have conflicts with concurrent commits
pass
3 changes: 3 additions & 0 deletions cli/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# eslint-plugin-promise@7.2.1 declares peer dep eslint: "^7||^8||^9" but works fine with ESLint 10.
# Remove this once eslint-plugin-promise releases a version that formally supports ESLint 10.
legacy-peer-deps=true
6 changes: 3 additions & 3 deletions cli/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import prettierConfig from 'eslint-config-prettier';
import unicorn from 'eslint-plugin-unicorn';
import n from 'eslint-plugin-n';
import promise from 'eslint-plugin-promise';
import importPlugin from 'eslint-plugin-import';
import importPlugin from 'eslint-plugin-import-x';

export default [
eslint.configs.recommended,
Expand Down Expand Up @@ -43,7 +43,7 @@ export default [
],

// Import: Consistent ordering
'import/order': [
'import-x/order': [
'error',
{
groups: [
Expand All @@ -58,7 +58,7 @@ export default [
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
'import/no-unresolved': 'off', // TypeScript handles this
'import-x/no-unresolved': 'off', // TypeScript handles this
},
},

Expand Down
Loading
Loading