Skip to content

Commit d74a856

Browse files
committed
Rule for Agents
1 parent 302557a commit d74a856

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ src/
5757
- Package `__init__.py` files contain brief package descriptions
5858
- Central `constants.py` for shared constants with descriptive comments
5959
- Type aliases defined at module level for clarity
60+
- Use Final[type] as type hint for all constants
6061

6162
#### Configuration
6263
- All config uses Pydantic models extending `ConfigurationBase`

src/constants.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
from typing import Final
44

5+
# Use Final[type] as type hint for all constants to ensure that type checkers (Mypy etc.)
6+
# will be able to detect assignements to such constants.
7+
58
# Minimal and maximal supported Llama Stack version
69
MINIMAL_SUPPORTED_LLAMA_STACK_VERSION: Final[str] = "0.2.17"
710
MAXIMAL_SUPPORTED_LLAMA_STACK_VERSION: Final[str] = "0.6.0"

0 commit comments

Comments
 (0)