Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install dependencies
run: poetry install
- name: Compile
run: poetry run mypy .
run: poetry run mypy . --strict
test:
runs-on: ubuntu-latest
steps:
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 AgentMail

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion src/agentmail/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Python 3.8 compatibility regression: list[str] is only valid at runtime in Python 3.9+. Use typing.List[str] instead.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/agentmail/__init__.py, line 441:

<comment>Python 3.8 compatibility regression: `list[str]` is only valid at runtime in Python 3.9+. Use `typing.List[str]` instead.</comment>

<file context>
@@ -438,7 +438,7 @@ def __getattr__(attr_name: str) -> typing.Any:
 
 
-def __dir__():
+def __dir__() -> list[str]:
     lazy_attrs = list(_dynamic_imports.keys())
     return sorted(lazy_attrs)
</file context>
Suggested change
def __dir__() -> list[str]:
def __dir__() -> typing.List[str]:
Fix with Cubic

lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/agent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: list[str] return annotation breaks Python 3.8 compatibility

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/agentmail/agent/__init__.py, line 34:

<comment>`list[str]` return annotation breaks Python 3.8 compatibility</comment>

<file context>
@@ -31,7 +31,7 @@ def __getattr__(attr_name: str) -> typing.Any:
 
 
-def __dir__():
+def __dir__() -> list[str]:
     lazy_attrs = list(_dynamic_imports.keys())
     return sorted(lazy_attrs)
</file context>
Suggested change
def __dir__() -> list[str]:
def __dir__() -> typing.List[str]:
Fix with Cubic

lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/agent/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/api_keys/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/api_keys/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/attachments/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/attachments/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Runtime compatibility regression: list[str] is not valid on Python 3.8

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/agentmail/core/__init__.py, line 95:

<comment>Runtime compatibility regression: `list[str]` is not valid on Python 3.8</comment>

<file context>
@@ -92,7 +92,7 @@ def __getattr__(attr_name: str) -> typing.Any:
 
 
-def __dir__():
+def __dir__() -> list[str]:
     lazy_attrs = list(_dynamic_imports.keys())
     return sorted(lazy_attrs)
</file context>
Suggested change
def __dir__() -> list[str]:
def __dir__() -> typing.List[str]:
Fix with Cubic

lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/core/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class EventEmitterMixin:
"""

def __init__(self) -> None:
self._callbacks: typing.Dict[EventType, typing.List[typing.Callable]] = {}
self._callbacks: typing.Dict[EventType, typing.List[typing.Callable[..., typing.Any]]] = {}

def on(self, event_name: EventType, callback: typing.Callable[[typing.Any], typing.Any]) -> None:
if event_name not in self._callbacks:
Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/core/http_sse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/core/query_encoder.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file was auto-generated by Fern from our API Definition.

from typing import Any, Dict, List, Optional, Tuple
import json
from typing import Any, Dict, List, Optional, Tuple

import pydantic

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/domains/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/domains/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/drafts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/drafts/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/errors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/events/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/events/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/inbox_events/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: list[str] annotation causes an import-time crash on Python 3.8, which is a declared supported version.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/agentmail/inbox_events/__init__.py, line 34:

<comment>`list[str]` annotation causes an import-time crash on Python 3.8, which is a declared supported version.</comment>

<file context>
@@ -31,7 +31,7 @@ def __getattr__(attr_name: str) -> typing.Any:
 
 
-def __dir__():
+def __dir__() -> list[str]:
     lazy_attrs = list(_dynamic_imports.keys())
     return sorted(lazy_attrs)
</file context>
Suggested change
def __dir__() -> list[str]:
def __dir__() -> typing.List[str]:
Fix with Cubic

lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/inbox_events/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/inboxes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/inboxes/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/lists/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/lists/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Runtime compatibility break on Python 3.8: list[str] is not subscriptable at runtime in Python versions before 3.9. The project supports python = "^3.8" and this file does not use from __future__ import annotations to postpone evaluation.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/agentmail/lists/types/__init__.py, line 47:

<comment>Runtime compatibility break on Python 3.8: `list[str]` is not subscriptable at runtime in Python versions before 3.9. The project supports `python = "^3.8"` and this file does not use `from __future__ import annotations` to postpone evaluation.</comment>

<file context>
@@ -44,7 +44,7 @@ def __getattr__(attr_name: str) -> typing.Any:
 
 
-def __dir__():
+def __dir__() -> list[str]:
     lazy_attrs = list(_dynamic_imports.keys())
     return sorted(lazy_attrs)
</file context>
Fix with Cubic

lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/messages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: list[str] breaks Python 3.8 compatibility at runtime

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/agentmail/messages/__init__.py, line 109:

<comment>`list[str]` breaks Python 3.8 compatibility at runtime</comment>

<file context>
@@ -106,7 +106,7 @@ def __getattr__(attr_name: str) -> typing.Any:
 
 
-def __dir__():
+def __dir__() -> list[str]:
     lazy_attrs = list(_dynamic_imports.keys())
     return sorted(lazy_attrs)
</file context>
Suggested change
def __dir__() -> list[str]:
def __dir__() -> typing.List[str]:
Fix with Cubic

lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/messages/errors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/messages/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/metrics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Using list[str] as a runtime-evaluated type annotation breaks Python 3.8 compatibility. Built-in generics are only subscriptable at runtime starting from Python 3.9+ (PEP 585). The project supports python = "^3.8" and the file doesn't have from __future__ import annotations, so this annotation will raise a TypeError on Python 3.8. Use typing.List[str] instead, consistent with the existing typing.Dict[str, str] annotation in this file.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/agentmail/metrics/__init__.py, line 49:

<comment>Using `list[str]` as a runtime-evaluated type annotation breaks Python 3.8 compatibility. Built-in generics are only subscriptable at runtime starting from Python 3.9+ (PEP 585). The project supports `python = "^3.8"` and the file doesn't have `from __future__ import annotations`, so this annotation will raise a `TypeError` on Python 3.8. Use `typing.List[str]` instead, consistent with the existing `typing.Dict[str, str]` annotation in this file.</comment>

<file context>
@@ -46,7 +46,7 @@ def __getattr__(attr_name: str) -> typing.Any:
 
 
-def __dir__():
+def __dir__() -> list[str]:
     lazy_attrs = list(_dynamic_imports.keys())
     return sorted(lazy_attrs)
</file context>
Suggested change
def __dir__() -> list[str]:
def __dir__() -> typing.List[str]:
Fix with Cubic

lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/metrics/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/organizations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/organizations/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/pods/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0: list[str] annotation breaks Python 3.8 compatibility at import time

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/agentmail/pods/__init__.py, line 44:

<comment>`list[str]` annotation breaks Python 3.8 compatibility at import time</comment>

<file context>
@@ -41,7 +41,7 @@ def __getattr__(attr_name: str) -> typing.Any:
 
 
-def __dir__():
+def __dir__() -> list[str]:
     lazy_attrs = list(_dynamic_imports.keys())
     return sorted(lazy_attrs)
</file context>
Suggested change
def __dir__() -> list[str]:
def __dir__() -> typing.List[str]:
Fix with Cubic

lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/pods/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/threads/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/threads/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Using list[str] breaks Python 3.8 runtime compatibility because PEP 585 built-in generics are not subscriptable at runtime before Python 3.9. The project declares python = "^3.8" in pyproject.toml and does not use from __future__ import annotations to defer annotation evaluation.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/agentmail/threads/types/__init__.py, line 69:

<comment>Using `list[str]` breaks Python 3.8 runtime compatibility because PEP 585 built-in generics are not subscriptable at runtime before Python 3.9. The project declares `python = "^3.8"` in pyproject.toml and does not use `from __future__ import annotations` to defer annotation evaluation.</comment>

<file context>
@@ -66,7 +66,7 @@ def __getattr__(attr_name: str) -> typing.Any:
 
 
-def __dir__():
+def __dir__() -> list[str]:
     lazy_attrs = list(_dynamic_imports.keys())
     return sorted(lazy_attrs)
</file context>
Suggested change
def __dir__() -> list[str]:
def __dir__() -> typing.List[str]:
Fix with Cubic

lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/webhooks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: list[str] return type annotation breaks Python 3.8 runtime compatibility

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/agentmail/webhooks/__init__.py, line 51:

<comment>`list[str]` return type annotation breaks Python 3.8 runtime compatibility</comment>

<file context>
@@ -48,7 +48,7 @@ def __getattr__(attr_name: str) -> typing.Any:
 
 
-def __dir__():
+def __dir__() -> list[str]:
     lazy_attrs = list(_dynamic_imports.keys())
     return sorted(lazy_attrs)
</file context>
Suggested change
def __dir__() -> list[str]:
def __dir__() -> typing.List[str]:
Fix with Cubic

lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/webhooks/events/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/webhooks/events/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/webhooks/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
2 changes: 1 addition & 1 deletion src/agentmail/websockets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __getattr__(attr_name: str) -> typing.Any:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
def __dir__() -> list[str]:
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)

Expand Down
Loading