Skip to content

Commit cbca379

Browse files
kapillamba4claude
andcommitted
Fix lint errors and bump version to 1.0.27
Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 6098bbe commit cbca379

7 files changed

Lines changed: 21 additions & 19 deletions

File tree

api_types.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99

1010
from __future__ import annotations
1111

12-
from typing import Literal
13-
from typing_extensions import NotRequired, TypedDict
12+
from typing import Literal, NotRequired
13+
14+
from typing_extensions import TypedDict
1415

1516
# ---------------------------------------------------------------------------
1617
# Shared / Nested Types

doc_parser.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def index_doc_directory(dirpath: str, db, progress_callback=None, progress_offse
358358
"""
359359
abs_dir = os.path.abspath(dirpath)
360360
results = []
361-
361+
362362
gitignore = GitignoreMatcher(abs_dir)
363363

364364
# First pass: count files
@@ -367,19 +367,19 @@ def index_doc_directory(dirpath: str, db, progress_callback=None, progress_offse
367367
rel_root = os.path.relpath(root, abs_dir)
368368
if rel_root != ".":
369369
gitignore.check_dir_for_gitignore(root, rel_root)
370-
370+
371371
dirs[:] = [
372-
d for d in dirs
373-
if d not in SKIP_DIRS
372+
d for d in dirs
373+
if d not in SKIP_DIRS
374374
and not d.startswith(".")
375375
and not gitignore.should_skip(os.path.join(rel_root, d) if rel_root != "." else d, is_dir=True)
376376
]
377-
377+
378378
for filename in files:
379379
rel_path = os.path.join(rel_root, filename) if rel_root != "." else filename
380380
if gitignore.should_skip(rel_path, is_dir=False):
381381
continue
382-
382+
383383
ext = os.path.splitext(filename)[1].lower()
384384
if ext in DOC_EXTENSIONS:
385385
doc_files.append(os.path.join(root, filename))

git_search.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from __future__ import annotations
1717

18-
from datetime import datetime, timezone
18+
from datetime import UTC, datetime
1919
from pathlib import Path
2020
from typing import Any
2121

@@ -35,7 +35,7 @@ def _commit_to_dict(commit: git.Commit, *, include_files_changed_count: bool = F
3535
include_files_changed_count: If True, compute the number of files
3636
changed (triggers a diff — slow for bulk iteration).
3737
"""
38-
dt = datetime.fromtimestamp(commit.committed_date, tz=timezone.utc)
38+
dt = datetime.fromtimestamp(commit.committed_date, tz=UTC)
3939
result: dict[str, Any] = {
4040
"hash": commit.hexsha[:7],
4141
"full_hash": commit.hexsha,
@@ -144,7 +144,7 @@ def get_commit_detail(
144144
raise errors.GitError(f"Could not resolve commit '{commit_hash}': {exc}")
145145

146146
try:
147-
dt = datetime.fromtimestamp(commit.committed_date, tz=timezone.utc)
147+
dt = datetime.fromtimestamp(commit.committed_date, tz=UTC)
148148

149149
parent_hashes = [p.hexsha[:7] for p in commit.parents]
150150

@@ -275,7 +275,7 @@ def get_blame(
275275
"full_hash": commit.hexsha,
276276
"author": str(commit.author),
277277
"date": datetime.fromtimestamp(
278-
commit.committed_date, tz=timezone.utc
278+
commit.committed_date, tz=UTC
279279
).isoformat(),
280280
"line_content": line_text,
281281
"commit_message": commit.message.strip().split("\n")[0],

parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ def _parse_file_task(fpath: str) -> tuple[str, dict | None, Exception | None]:
556556

557557
# Use code2code task_type at index time (query time uses nl2code)
558558
all_embeddings = db_mod.embed_texts_batch(all_embed_texts, batch_size=64, task_type="code2code") if all_embed_texts else []
559-
559+
560560
file_to_embeddings = {}
561561
embed_idx = 0
562562
for fpath, embed_inputs in embedding_batches:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "code-memory"
7-
version = "1.0.26"
7+
version = "1.0.27"
88
description = "A deterministic, high-precision code intelligence MCP server"
99
readme = "README.md"
1010
license = "MIT"

server.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
"url": "https://github.com/kapillamba4/code-memory",
77
"source": "github"
88
},
9-
"version": "1.0.26",
9+
"version": "1.0.27",
1010
"packages": [
1111
{
1212
"registryType": "pypi",
1313
"identifier": "code-memory",
14-
"version": "1.0.26",
14+
"version": "1.0.27",
1515
"transport": {
1616
"type": "stdio"
1717
},

test_pydantic.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
from typing import Literal, NotRequired
2+
13
from pydantic import TypeAdapter
2-
from typing import Literal
3-
from typing_extensions import NotRequired, TypedDict
4-
import json
4+
from typing_extensions import TypedDict
5+
56

67
class ContextChunk(TypedDict):
78
type: Literal["previous", "current", "next"]

0 commit comments

Comments
 (0)