diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..60625f9 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,18 @@ +# From code-shape-kit's templates/CODEOWNERS. With "Require review from Code +# Owners" on in the branch protection rules, a pull request that changes the +# code-shape rules can't be merged without the owner's approval: a red gate +# can't be turned green by loosening them. + +# [tool.shape] (limits, banned APIs, output_modules, ...), [tool.importlinter] +# (memclaw's layout rules), [tool.vulture] and the pinned kit version +/pyproject.toml @emanuilo +# the baseline: known violations (memclaw's is empty) +/.code-shape/ @emanuilo +# the hooks that run `code-shape check` before a commit (git and Claude Code) +/.githooks/ @emanuilo +/.claude/settings.json @emanuilo +/.claude/hooks/ @emanuilo +# the CI gate itself (the `shape` job) +/.github/workflows/ci.yml @emanuilo +# this file +/.github/CODEOWNERS @emanuilo diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5d0a505..9c9b6b7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,7 @@ pip install -U pip pip install -e ".[dev]" --group shape ``` -(`--group shape` adds the code-shape checks, see [Code Shape](#code-shape). It needs pip 25.1+ and Python 3.11+. With uv: `uv sync --extra dev --group shape`.) +(`--group shape` adds the code-shape checks, see [Code Shape](#code-shape). It needs pip 25.1+ and Python 3.11.4+. With uv: `uv sync --extra dev --group shape`.) Copy the environment template and fill in your keys: @@ -43,7 +43,9 @@ All tests should pass before submitting a PR. The test suite mocks external API - **Sizes**: files (500 lines), classes (300), folders (12 modules, 4000 lines), nesting of folders. - **Functions and classes**: complexity, length, number of arguments, variables, attributes and public methods. - **Coupling**: environment variables or `.env` files read outside `config.py`, the OpenAI SDK or SQLite used outside their modules, private members (`obj._x`) used from outside, copy-pasted code, import cycles, modules that import too many others (more than 8 memclaw modules). -- **Hygiene**: unused code, dependencies in `pyproject.toml` vs. what the code imports, and type errors (mypy). +- **Hygiene**: unused code, dependencies in `pyproject.toml` vs. what the code imports, and type errors (mypy, also inside functions without type hints). +- **Risky habits**: errors caught too broadly or swallowed (`except Exception`, an `except` that only passes), commented-out code, `print()` (see below), mutable default arguments (`def f(x=[])`), `from x import *`, `shell=True` / SQL built from strings / hard-coded passwords / `eval`, and `True`/`False` arguments passed by position (make them keyword-only: `def f(*, verbose: bool)`). +- **Suppression comments**: every `# noqa`, `# type: ignore`, `# pylint: disable`, `# pragma: no cover` or `# nosec` is a finding. A `# type: ignore` that isn't needed any more is an error too. - **memclaw's layout rules** (see below). CI runs it on every PR. Locally: @@ -52,7 +54,13 @@ CI runs it on every PR. Locally: - `code-shape report`: writes `code-shape-report.md` with all the numbers, the worst offenders and git-history trends. It never fails. - `code-shape tighten`: after a fix, records the improvement in the baseline. Commit the baseline together with the fix. -**The baseline.** `.code-shape/baseline.json` lists the problems memclaw already had when the kit was adopted, so only new ones fail. It may only shrink. Never edit it by hand and don't re-run `code-shape baseline` to accept a new problem: fix the code, then run `code-shape tighten`. `# noqa` comments don't silence these checks, and the limits under `[tool.shape]` in `pyproject.toml` aren't raised to make a change pass. If a rule seems wrong for your case, say so in the PR. +**The baseline.** `.code-shape/baseline.json` lists the problems memclaw already had when the kit was adopted, so only new ones fail. It may only shrink. Never edit it by hand and don't re-run `code-shape baseline` to accept a new problem: fix the code, then run `code-shape tighten`. Suppression comments don't silence these checks (they are findings themselves), and the limits under `[tool.shape]` in `pyproject.toml` aren't raised to make a change pass. If a rule seems wrong for your case, say so in the PR. + +**Printing.** Only the entry points (`cli.py`, `__main__.py`) and the Cursor hook script (which answers Cursor on stdout) may call `print()`: they are listed in `output_modules` under `[tool.shape]`. Everywhere else, write to the terminal with rich's `console` and log with loguru's `logger`. + +**Catching every error.** `except Exception` must log with `logger.exception(...)` (it keeps the traceback); `logger.error(f"... {e}")` doesn't count. The few functions that deliberately catch everything without a traceback (a loop that must keep running, a health check whose failure is the result) are listed with a reason in `[tool.shape.error_boundaries]` in `pyproject.toml`. That list is under CODEOWNERS review and is never for debt: a new catch-all is fixed in the code. + +**Who approves rule changes.** `.github/CODEOWNERS` makes the maintainer (`@emanuilo`) the owner of the files that set the rules: `pyproject.toml`, the baseline, the hooks and the CI workflow. **Unused code that isn't.** If the unused-code check (vulture) reports a name that a library uses by reflection (e.g. uvicorn reading `Server.should_exit`), add it to `ignore_names` under `[tool.vulture]` in `pyproject.toml`, with a one-line reason. Make sure nothing could call it first: unused code is usually really unused. Agents ask a human before adding a line. diff --git a/memclaw/agent.py b/memclaw/agent.py index 7473847..ac88741 100644 --- a/memclaw/agent.py +++ b/memclaw/agent.py @@ -108,7 +108,7 @@ async def start(self, *, include_backend: bool = True): except Exception as exc: # E.g. OpenAI unreachable. The bot still works; the background # sync (or the next start) indexes what's missing. - logger.warning("Index sync at startup failed: {exc}", exc=exc) + logger.exception("Index sync at startup failed: {exc}", exc=exc) if include_backend: await self.backend.on_agent_start(self._tools) self._backend_started = True @@ -171,7 +171,7 @@ async def build_context( except Exception as exc: # E.g. OpenAI unreachable: answer without memories rather than # failing the message. memory_search reports its own errors. - logger.warning("Context memory search failed: {exc}", exc=exc) + logger.exception("Context memory search failed: {exc}", exc=exc) results = [] results = [ r for r in results if Path(r.file_path).name != self.config.memory_file.name diff --git a/memclaw/backends/claude/cli.py b/memclaw/backends/claude/cli.py index 6367676..fea3979 100644 --- a/memclaw/backends/claude/cli.py +++ b/memclaw/backends/claude/cli.py @@ -158,7 +158,7 @@ async def _connect( await client.connect() return client except Exception as exc: - logger.warning( + logger.exception( "Could not resume Claude session {id} ({exc}); starting a fresh one", id=resume, exc=exc, ) @@ -176,7 +176,7 @@ async def _disconnect(session: _Session) -> None: try: await client.disconnect() except Exception as exc: - logger.warning("Error while disconnecting Claude CLI: {exc}", exc=exc) + logger.exception("Error while disconnecting Claude CLI: {exc}", exc=exc) async def reset(self, session_key: str) -> None: session = self._sessions.get(session_key) diff --git a/memclaw/backends/cursor/agents.py b/memclaw/backends/cursor/agents.py index 770f5ec..a314a5b 100644 --- a/memclaw/backends/cursor/agents.py +++ b/memclaw/backends/cursor/agents.py @@ -161,4 +161,4 @@ async def close(self) -> None: try: await agent.close() except Exception as exc: - logger.warning("Error while closing Cursor agent: {exc}", exc=exc) + logger.exception("Error while closing Cursor agent: {exc}", exc=exc) diff --git a/memclaw/backends/cursor/bridge.py b/memclaw/backends/cursor/bridge.py index ae2c51d..b12ae20 100644 --- a/memclaw/backends/cursor/bridge.py +++ b/memclaw/backends/cursor/bridge.py @@ -85,4 +85,4 @@ async def drop(self, client: Any) -> None: try: await client.aclose() except Exception as exc: - logger.warning("Error while closing the Cursor SDK bridge: {exc}", exc=exc) + logger.exception("Error while closing the Cursor SDK bridge: {exc}", exc=exc) diff --git a/memclaw/backends/mcp_tools.py b/memclaw/backends/mcp_tools.py index 293fcfb..a201929 100644 --- a/memclaw/backends/mcp_tools.py +++ b/memclaw/backends/mcp_tools.py @@ -29,11 +29,11 @@ def build_memclaw_mcp_server(executor: "ToolExecutor") -> Server: for defn in TOOL_DEFINITIONS ] - @server.list_tools() # type: ignore[untyped-decorator] + @server.list_tools() async def list_tools() -> list[Tool]: return cached_tools - @server.call_tool() # type: ignore[untyped-decorator] + @server.call_tool() async def call_tool(name: str, arguments: dict[str, Any]) -> CallToolResult: if name not in tool_names: raise ValueError(f"Tool {name!r} not found") diff --git a/memclaw/backends/model_selection.py b/memclaw/backends/model_selection.py index 34db382..34a95df 100644 --- a/memclaw/backends/model_selection.py +++ b/memclaw/backends/model_selection.py @@ -60,7 +60,7 @@ async def _model_info(self, model_id: str) -> ModelInfo | None: try: await self.list_models() except Exception as exc: - logger.warning("Could not fetch the {b} model list: {exc}", b=self._label, exc=exc) + logger.exception("Could not fetch the {b} model list: {exc}", b=self._label, exc=exc) return None return next((m for m in self._models if m.id == model_id), None) diff --git a/memclaw/bot/commands.py b/memclaw/bot/commands.py index 51f1857..c2b9aa0 100644 --- a/memclaw/bot/commands.py +++ b/memclaw/bot/commands.py @@ -18,7 +18,7 @@ async def load_models(backend: AgentBackend) -> list: try: return await backend.list_models() except Exception as exc: - logger.warning("Could not fetch the model list: {exc}", exc=exc) + logger.exception("Could not fetch the model list: {exc}", exc=exc) return [] diff --git a/memclaw/bot/links.py b/memclaw/bot/links.py index c6026ca..a76a190 100644 --- a/memclaw/bot/links.py +++ b/memclaw/bot/links.py @@ -30,7 +30,7 @@ def extract_urls(self, text: str) -> list[str]: if parsed.scheme and parsed.netloc and url not in seen: seen.add(url) cleaned.append(url) - except Exception: + except ValueError: # urlparse rejects e.g. a malformed IPv6 host continue return cleaned @@ -89,7 +89,7 @@ async def summarize(self, content: str, url: str) -> str | None: {"role": "user", "content": f"Summarize content from {url}:\n\n{content}"}, ]) except Exception as exc: - logger.warning("summarize failed for {url}: {exc}", url=url, exc=exc) + logger.exception("summarize failed for {url}: {exc}", url=url, exc=exc) return None async def process_links(self, text: str) -> list[dict]: diff --git a/memclaw/bot/slack.py b/memclaw/bot/slack.py index a277110..62356c6 100644 --- a/memclaw/bot/slack.py +++ b/memclaw/bot/slack.py @@ -200,7 +200,7 @@ async def _download_slack_file(self, file_info: dict) -> bytes | None: resp.raise_for_status() return resp.content except Exception as exc: - logger.error("Failed to download Slack file: {exc}", exc=exc) + logger.exception("Failed to download Slack file: {exc}", exc=exc) return None async def _upload_and_share_image(self, thread: _Thread, image_path: str, caption: str | None = None): @@ -220,7 +220,7 @@ async def _upload_and_share_image(self, thread: _Thread, image_path: str, captio ) logger.debug("Uploaded image to Slack: {r}", r=result.get("ok")) except Exception as exc: - logger.error("Failed to upload image to Slack: {exc}", exc=exc) + logger.exception("Failed to upload image to Slack: {exc}", exc=exc) async def _send_response(self, thread: _Thread, response_text: str, found_images: list[dict]): """Send agent response: images first, then text.""" diff --git a/memclaw/bot/telegram.py b/memclaw/bot/telegram.py index 903ca89..d189173 100644 --- a/memclaw/bot/telegram.py +++ b/memclaw/bot/telegram.py @@ -182,7 +182,7 @@ async def _send_response( caption=img.get("caption") or None, ) except Exception as e: - logger.error(f"Failed to send image {img.get('file_id')}: {e}") + logger.exception(f"Failed to send image {img.get('file_id')}: {e}") if response_text: try: diff --git a/memclaw/bot/whatsapp.py b/memclaw/bot/whatsapp.py index 6698e14..70cce32 100644 --- a/memclaw/bot/whatsapp.py +++ b/memclaw/bot/whatsapp.py @@ -135,7 +135,7 @@ async def _handle_image(self, cli: NewAClient, ev: MessageEv): try: image_bytes = await cli.download_any(ev.Message) except Exception as exc: - logger.error("Failed to download WhatsApp image: {exc}", exc=exc) + logger.exception("Failed to download WhatsApp image: {exc}", exc=exc) await cli.reply_message("Sorry, I couldn't download that image.", ev) return @@ -154,7 +154,7 @@ async def _handle_audio(self, cli: NewAClient, ev: MessageEv): try: audio_bytes = await cli.download_any(ev.Message) except Exception as exc: - logger.error("Failed to download WhatsApp audio: {exc}", exc=exc) + logger.exception("Failed to download WhatsApp audio: {exc}", exc=exc) await cli.reply_message("Sorry, I couldn't download that audio message.", ev) return @@ -195,7 +195,7 @@ async def _send_response( try: await cli.send_message(chat, response_text) except Exception as exc: - logger.error("Failed to send WhatsApp message: {exc}", exc=exc) + logger.exception("Failed to send WhatsApp message: {exc}", exc=exc) @staticmethod async def _send_image(cli: NewAClient, chat, img: dict) -> str: @@ -209,7 +209,7 @@ async def _send_image(cli: NewAClient, chat, img: dict) -> str: try: await cli.send_image(chat, media_ref, caption=img.get("caption") or None) except Exception as exc: - logger.error("Failed to send WhatsApp image: {exc}", exc=exc) + logger.exception("Failed to send WhatsApp image: {exc}", exc=exc) return "" # ── Lifecycle ──────────────────────────────────────────────────── diff --git a/memclaw/memory/consolidation.py b/memclaw/memory/consolidation.py index 62c3fa4..d29586e 100644 --- a/memclaw/memory/consolidation.py +++ b/memclaw/memory/consolidation.py @@ -222,7 +222,7 @@ async def consolidate(self, *, force: bool = False, since: date | None = None) - try: await self._index.index_file(self.config.memory_file) except Exception as exc: - logger.warning("Indexing MEMORY.md after consolidation failed: {exc}", exc=exc) + logger.exception("Indexing MEMORY.md after consolidation failed: {exc}", exc=exc) remaining = len(unconsolidated) - len(included) logger.info( "Consolidation complete: {n} files → MEMORY.md (through {d}){more}", diff --git a/memclaw/memory/index.py b/memclaw/memory/index.py index 1a10154..b97669d 100644 --- a/memclaw/memory/index.py +++ b/memclaw/memory/index.py @@ -174,7 +174,7 @@ async def get_embeddings(self, texts: list[str]) -> list[np.ndarray]: # Compute content hashes and check cache hashes = [hashlib.sha256(t.encode()).hexdigest() for t in texts] - results: list[np.ndarray | None] = [None] * len(texts) + found: dict[int, np.ndarray] = {} uncached_indices: list[int] = [] for i, h in enumerate(hashes): @@ -183,7 +183,7 @@ async def get_embeddings(self, texts: list[str]) -> list[np.ndarray]: (h, model), ).fetchone() if row is not None: - results[i] = self.deserialize_embedding(row[0]) + found[i] = self.deserialize_embedding(row[0]) else: uncached_indices.append(i) @@ -194,14 +194,14 @@ async def get_embeddings(self, texts: list[str]) -> list[np.ndarray]: new_embeddings = [np.array(v, dtype=np.float32) for v in vectors] for idx, emb in zip(uncached_indices, new_embeddings): - results[idx] = emb + found[idx] = emb self.db.execute( "INSERT OR REPLACE INTO embedding_cache (content_hash, embedding, model) VALUES (?, ?, ?)", (hashes[idx], self.serialize_embedding(emb), model), ) self.db.commit() - return results # type: ignore[return-value] + return [found[i] for i in range(len(texts))] async def get_embedding(self, text: str) -> np.ndarray: results = await self.get_embeddings([text]) diff --git a/memclaw/memory/search.py b/memclaw/memory/search.py index 5f2cbda..e080c71 100644 --- a/memclaw/memory/search.py +++ b/memclaw/memory/search.py @@ -170,7 +170,7 @@ def _combine( combined: list[tuple[int, float, str]] = [] for cid in set(v_scores) | set(k_scores): final = vw * v_scores.get(cid, 0.0) + tw * k_scores.get(cid, 0.0) - combined.append((cid, final, _match_type(cid in v_scores, cid in k_scores))) + combined.append((cid, final, _match_type(in_vector=cid in v_scores, in_keyword=cid in k_scores))) combined.sort(key=lambda x: x[1], reverse=True) return combined @@ -303,7 +303,7 @@ def _normalise(vector_hits: list[tuple[int, float]]) -> dict[int, float]: } -def _match_type(in_vector: bool, in_keyword: bool) -> str: +def _match_type(*, in_vector: bool, in_keyword: bool) -> str: if in_vector and in_keyword: return "hybrid" return "vector" if in_vector else "keyword" diff --git a/memclaw/reminders.py b/memclaw/reminders.py index 8187942..d93d5bf 100644 --- a/memclaw/reminders.py +++ b/memclaw/reminders.py @@ -130,10 +130,7 @@ async def _run(self): raise except Exception as exc: logger.exception("Reminder tick failed: {exc}", exc=exc) - try: - await asyncio.sleep(self.poll_interval) - except asyncio.CancelledError: - raise + await asyncio.sleep(self.poll_interval) async def _tick(self): now = datetime.now() diff --git a/memclaw/setup/wizard.py b/memclaw/setup/wizard.py index 1e25fdd..6ea9b94 100644 --- a/memclaw/setup/wizard.py +++ b/memclaw/setup/wizard.py @@ -156,7 +156,7 @@ def run_setup(config: MemclawConfig, *, reconfigure: bool = False) -> None: either way -- it depends only on the chosen platform. """ existing = read_env_file() - _print_intro(reconfigure) + _print_intro(reconfigure=reconfigure) # Start from any previously-saved values so platform-scoped keys we don't # prompt for this round (because the user picked a different platform) are @@ -181,7 +181,7 @@ def run_setup(config: MemclawConfig, *, reconfigure: bool = False) -> None: check_openai(values.get("OPENAI_API_KEY"), console) -def _print_intro(reconfigure: bool) -> None: +def _print_intro(*, reconfigure: bool) -> None: if reconfigure: console.print( Panel( diff --git a/memclaw/tools/context.py b/memclaw/tools/context.py index 028df4f..0052b97 100644 --- a/memclaw/tools/context.py +++ b/memclaw/tools/context.py @@ -60,6 +60,6 @@ async def index_written(ctx: ToolContext, path: Path) -> str: try: await ctx.index.index_file(path) except Exception as exc: - logger.warning("Indexing {p} failed, will retry on next sync: {exc}", p=path, exc=exc) + logger.exception("Indexing {p} failed, will retry on next sync: {exc}", p=path, exc=exc) return " (search indexing is delayed; it will be searchable soon)" return "" diff --git a/memclaw/tools/executor.py b/memclaw/tools/executor.py index fb07478..089eb46 100644 --- a/memclaw/tools/executor.py +++ b/memclaw/tools/executor.py @@ -4,6 +4,8 @@ from typing import Any +from loguru import logger + from .catalog import find_tool from .context import ToolContext @@ -26,4 +28,5 @@ async def execute(self, name: str, tool_input: dict[str, Any]) -> str: try: return await tool.run(self.context, tool_input) except Exception as e: + logger.exception("Tool {name} failed: {exc}", name=name, exc=e) return f"Error executing {name}: {e}" diff --git a/pyproject.toml b/pyproject.toml index 95864aa..5046691 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,9 +69,9 @@ dev = [ # (pip >= 25.1) or `uv sync --extra dev --group shape`. [dependency-groups] # code-shape-kit: the `code-shape` checks (CI and pre-commit hooks). It needs -# Python 3.11+ while memclaw also supports 3.10, hence the marker. +# Python 3.11.4+ while memclaw also supports 3.10, hence the marker. shape = [ - "code-shape-kit[tools] @ git+https://github.com/emanuilo/code-shape-kit@v0.1.3 ; python_version >= '3.11'", + "code-shape-kit[tools] @ git+https://github.com/emanuilo/code-shape-kit@v0.2.2 ; python_full_version >= '3.11.4'", ] [tool.hatch.build.targets.wheel] @@ -101,6 +101,10 @@ tests = "tests" # from MemclawConfig. The Cursor hook script is copied out of the package and # run on its own, so it reads its env itself. config_modules = ["memclaw/config.py", "memclaw/defaults/cursor_hooks/*"] +# The only modules that may print(): the kit's default entry points, plus the +# Cursor hook script, which answers Cursor by printing JSON to stdout. The rest +# of memclaw writes to the terminal through rich's console, and logs with loguru. +output_modules = ["*/cli.py", "*/__main__.py", "memclaw/defaults/cursor_hooks/*"] baseline = ".code-shape/baseline.json" [tool.shape.limits] @@ -116,6 +120,24 @@ fan_out = 8 # Settings come from memclaw/config.py only (config_modules above bans os.environ elsewhere); .env files too. "dotenv" = { msg = "Only memclaw/config.py loads .env files. Use its read_env_file / update_env_file / reload_env_file, or add a setting there and read it from MemclawConfig.", allowed = ["memclaw/config.py"] } +[tool.shape.error_boundaries] +# Functions that deliberately catch every error and keep going without a +# traceback (each with its reason; changes need the CODEOWNERS review). Not +# for debt: a new catch-all is fixed in the code, not added here. +"memclaw/agent.py:MemclawAgent.start_background_sync._sync_loop" = "Background index sync runs every minute and is often offline; a warning, not a traceback, each time." +"memclaw/bot/telegram.py:_typing_loop" = "Best-effort typing indicator; a failed chat action must never stop the reply." +"memclaw/bot/telegram.py:TelegramBot._send_response" = "Falls back to plain text when Telegram rejects the agent's Markdown." +"memclaw/backends/base.py:report_tool_step" = "A failing progress callback must not break the agent's tool step." +"memclaw/reminders.py:ReminderScheduler._tick" = "The reminder loop must keep running; each failure is logged and retried next poll." +"memclaw/bot/links.py:LinkProcessor.fetch_content" = "Any fetch failure means 'no content'; the link is still saved." +"memclaw/backends/claude/configure.py:ask_model_and_effort" = "If the model list can't be loaded, keep the current model and tell the user why." +"memclaw/bot/terminal.py:chat" = "The terminal chat loop shows the error to the user and keeps going." +"memclaw/setup/doctor.py:check_openai" = "Health check: the failure is shown to the user as the result." +"memclaw/openai_client.py:_probe_embedding" = "Health probe: the failure is the result, reported to the user." +"memclaw/openai_client.py:_probe_chat" = "Health probe: the failure is the result, reported to the user." +"memclaw/openai_client.py:_probe_whisper" = "Health probe: the failure is the result, reported to the user." +"memclaw/memory/vault.py:MemoryVault.sync_or_warn" = "Startup index sync is optional (e.g. offline); warn and let the bot start." + [tool.shape.extra_args] # - dev tools live in the `dev` extra; docs/ holds a demo-capture script. # - aiohttp is never imported by memclaw, but slack_bolt.async_app (Slack) needs diff --git a/uv.lock b/uv.lock index fc509e4..266087a 100644 --- a/uv.lock +++ b/uv.lock @@ -5,7 +5,8 @@ resolution-markers = [ "python_full_version >= '3.15'", "python_full_version == '3.14.*'", "python_full_version >= '3.12' and python_full_version < '3.14'", - "python_full_version == '3.11.*'", + "python_full_version >= '3.11.4' and python_full_version < '3.12'", + "python_full_version >= '3.11' and python_full_version < '3.11.4'", "python_full_version < '3.11'", ] @@ -517,21 +518,21 @@ wheels = [ [[package]] name = "code-shape-kit" -version = "0.1.3" -source = { git = "https://github.com/emanuilo/code-shape-kit?rev=v0.1.3#2a860ef261b4ffede11fb20e604c16bbbdc004e1" } +version = "0.2.2" +source = { git = "https://github.com/emanuilo/code-shape-kit?rev=v0.2.2#4ca84f951d3094c2fb794a3b3272dec843aeb6a7" } dependencies = [ - { name = "grimp", marker = "python_full_version >= '3.11'" }, + { name = "grimp", marker = "python_full_version >= '3.11.4'" }, ] [package.optional-dependencies] tools = [ - { name = "complexipy", marker = "python_full_version >= '3.11'" }, - { name = "deptry", marker = "python_full_version >= '3.11'" }, - { name = "import-linter", marker = "python_full_version >= '3.11'" }, - { name = "mypy", marker = "python_full_version >= '3.11'" }, - { name = "pylint", marker = "python_full_version >= '3.11'" }, - { name = "ruff", version = "0.17.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, - { name = "vulture", marker = "python_full_version >= '3.11'" }, + { name = "complexipy", marker = "python_full_version >= '3.11.4'" }, + { name = "deptry", marker = "python_full_version >= '3.11.4'" }, + { name = "import-linter", marker = "python_full_version >= '3.11.4'" }, + { name = "mypy", marker = "python_full_version >= '3.11.4'" }, + { name = "pylint", marker = "python_full_version >= '3.11.4'" }, + { name = "ruff", version = "0.17.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11.4'" }, + { name = "vulture", marker = "python_full_version >= '3.11.4'" }, ] [[package]] @@ -756,11 +757,11 @@ name = "deptry" version = "0.25.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "click", marker = "python_full_version >= '3.11'" }, - { name = "colorama", marker = "python_full_version >= '3.11' and sys_platform == 'win32'" }, - { name = "packaging", marker = "python_full_version >= '3.11'" }, - { name = "requirements-parser", marker = "python_full_version >= '3.11'" }, - { name = "tomli", marker = "python_full_version >= '3.11' and python_full_version < '3.15'" }, + { name = "click", marker = "python_full_version >= '3.11.4'" }, + { name = "colorama", marker = "python_full_version >= '3.11.4' and sys_platform == 'win32'" }, + { name = "packaging", marker = "python_full_version >= '3.11.4'" }, + { name = "requirements-parser", marker = "python_full_version >= '3.11.4'" }, + { name = "tomli", marker = "python_full_version >= '3.11.4' and python_full_version < '3.15'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/b8/b2/50ccc99362ae7757342978b7ecb3b98e47fade721fd617d74db1948ec3a1/deptry-0.25.1.tar.gz", hash = "sha256:45c8cd982c85cd4faae573ddff6920de7eec735336db6973f26a765ae7950f7d", size = 509748, upload-time = "2026-03-18T23:22:18.139Z" } wheels = [ @@ -1091,9 +1092,9 @@ name = "import-linter" version = "2.17" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "click", marker = "python_full_version >= '3.11'" }, - { name = "grimp", marker = "python_full_version >= '3.11'" }, - { name = "rich", marker = "python_full_version >= '3.11'" }, + { name = "click", marker = "python_full_version >= '3.11.4'" }, + { name = "grimp", marker = "python_full_version >= '3.11.4'" }, + { name = "rich", marker = "python_full_version >= '3.11.4'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/77/e1/2b459e6666297634e1f6461a51851eb50f64e571f4351cb4ad51fad312d5/import_linter-2.17.tar.gz", hash = "sha256:74a4640c96b71965624d296508c3274655d3e4c2593c27b8330dd0570ebd6886", size = 1423183, upload-time = "2026-11-18T11:33:10.54Z" } wheels = [ @@ -1114,7 +1115,7 @@ name = "isort" version = "9.0.2" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "mypy-extensions", marker = "python_full_version >= '3.11'" }, + { name = "mypy-extensions", marker = "python_full_version >= '3.11.4'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/da/cf/068066b8fdab91cd40bcd63e483137908710a3d25a4d3a01b538be45d9d6/isort-9.0.2.tar.gz", hash = "sha256:d2298980ce44350f11d9d24c8150eaef1883431ec203dddbb4e9b5c3ceb54c70", size = 685196, upload-time = "2026-09-28T19:21:58.07Z" } wheels = [ @@ -1291,7 +1292,7 @@ name = "librt" version = "0.17.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "mypy-extensions", marker = "python_full_version >= '3.11'" }, + { name = "mypy-extensions", marker = "python_full_version >= '3.11.4'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/ed/82/9b31a8cd0fe33fde43132f43d2dab766976afc0d3d0763ea6082c4385b22/librt-0.17.0.tar.gz", hash = "sha256:fd18d1f708f78577556a7d76505048b9e3ad6ff61b8d9c91616a5a3f1e6c770b", size = 240190, upload-time = "2026-11-19T14:10:49.327Z" } wheels = [ @@ -1539,7 +1540,7 @@ dev = [ [package.dev-dependencies] shape = [ - { name = "code-shape-kit", extra = ["tools"], marker = "python_full_version >= '3.11'" }, + { name = "code-shape-kit", extra = ["tools"], marker = "python_full_version >= '3.11.4'" }, ] [package.metadata] @@ -1570,7 +1571,7 @@ requires-dist = [ provides-extras = ["cursor", "dev"] [package.metadata.requires-dev] -shape = [{ name = "code-shape-kit", extras = ["tools"], marker = "python_full_version >= '3.11'", git = "https://github.com/emanuilo/code-shape-kit?rev=v0.1.3" }] +shape = [{ name = "code-shape-kit", extras = ["tools"], marker = "python_full_version >= '3.11.4'", git = "https://github.com/emanuilo/code-shape-kit?rev=v0.2.2" }] [[package]] name = "multidict" @@ -1715,11 +1716,11 @@ name = "mypy" version = "2.4.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "ast-serialize", marker = "python_full_version >= '3.11'" }, - { name = "librt", marker = "python_full_version >= '3.11' and platform_python_implementation != 'PyPy'" }, - { name = "mypy-extensions", marker = "python_full_version >= '3.11'" }, - { name = "pathspec", marker = "python_full_version >= '3.11'" }, - { name = "typing-extensions", marker = "python_full_version >= '3.11'" }, + { name = "ast-serialize", marker = "python_full_version >= '3.11.4'" }, + { name = "librt", marker = "python_full_version >= '3.11.4' and platform_python_implementation != 'PyPy'" }, + { name = "mypy-extensions", marker = "python_full_version >= '3.11.4'" }, + { name = "pathspec", marker = "python_full_version >= '3.11.4'" }, + { name = "typing-extensions", marker = "python_full_version >= '3.11.4'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/4a/3c/78ecece71ee4b5445389a4ccd11627cfb9c69e4de554d11060171f376305/mypy-2.4.1.tar.gz", hash = "sha256:63b590965691e540a335fa74dadf31a7069142f6b72e234689bbd244edf55623", size = 4066728, upload-time = "2026-10-28T19:23:13.286Z" } wheels = [ @@ -1888,7 +1889,8 @@ resolution-markers = [ "python_full_version >= '3.15'", "python_full_version == '3.14.*'", "python_full_version >= '3.12' and python_full_version < '3.14'", - "python_full_version == '3.11.*'", + "python_full_version >= '3.11.4' and python_full_version < '3.12'", + "python_full_version >= '3.11' and python_full_version < '3.11.4'", ] sdist = { url = "https://files.pythonhosted.org/packages/d7/9f/b8cef5bffa569759033adda9481211426f12f53299629b410340795c2514/numpy-2.4.4.tar.gz", hash = "sha256:2d390634c5182175533585cc89f3608a4682ccb173cc9bb940b2881c8d6f8fa0", size = 20731587, upload-time = "2026-03-29T13:22:01.298Z" } wheels = [ @@ -2441,13 +2443,13 @@ name = "pylint" version = "4.1.4" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "astroid", marker = "python_full_version >= '3.11'" }, - { name = "colorama", marker = "python_full_version >= '3.11' and sys_platform == 'win32'" }, - { name = "dill", marker = "python_full_version >= '3.11'" }, - { name = "isort", marker = "python_full_version >= '3.11'" }, - { name = "mccabe", marker = "python_full_version >= '3.11'" }, - { name = "platformdirs", marker = "python_full_version >= '3.11'" }, - { name = "tomlkit", marker = "python_full_version >= '3.11'" }, + { name = "astroid", marker = "python_full_version >= '3.11.4'" }, + { name = "colorama", marker = "python_full_version >= '3.11.4' and sys_platform == 'win32'" }, + { name = "dill", marker = "python_full_version >= '3.11.4'" }, + { name = "isort", marker = "python_full_version >= '3.11.4'" }, + { name = "mccabe", marker = "python_full_version >= '3.11.4'" }, + { name = "platformdirs", marker = "python_full_version >= '3.11.4'" }, + { name = "tomlkit", marker = "python_full_version >= '3.11.4'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/8f/d7/bfea980ba1ea5666c7f774627f3a7159b98a21426a081dd2f05db8eb93b3/pylint-4.1.4.tar.gz", hash = "sha256:4c9176dc6c9f1b98b742195f01899b290369d5a27b4b41d1014c17f2f96b26f1", size = 1768302, upload-time = "2026-11-14T21:41:51.625Z" } wheels = [ @@ -2591,7 +2593,7 @@ name = "requirements-parser" version = "0.13.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "packaging", marker = "python_full_version >= '3.11'" }, + { name = "packaging", marker = "python_full_version >= '3.11.4'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/89/1a/5f3c22d38bf1d87d1f4a961489d9eba35c4370a21395562d94410cdd0e73/requirements_parser-0.13.1.tar.gz", hash = "sha256:78811383b2089b6c5197a1431bc2c12ff950245edca39a23eea3460782038dd3", size = 22783, upload-time = "2026-06-18T07:52:25.291Z" } wheels = [ @@ -2769,7 +2771,8 @@ resolution-markers = [ "python_full_version >= '3.15'", "python_full_version == '3.14.*'", "python_full_version >= '3.12' and python_full_version < '3.14'", - "python_full_version == '3.11.*'", + "python_full_version >= '3.11.4' and python_full_version < '3.12'", + "python_full_version >= '3.11' and python_full_version < '3.11.4'", ] sdist = { url = "https://files.pythonhosted.org/packages/df/8e/6929d337aa5380aafc7355f3149f3ccfe55cba5fdd34a045697ebaceb5a0/ruff-0.17.6.tar.gz", hash = "sha256:2b04276561331300325040bdca21460770029ec574d4c479099e39e8ad1ed43c", size = 5374388, upload-time = "2026-11-19T15:56:27.106Z" } wheels = [