@@ -6,9 +6,9 @@ This document contains critical information about working with this codebase. Fo
66
771 . Package Management
88 - ONLY use uv, NEVER pip
9- - Installation: ` uv add package `
10- - Running tools: ` uv run tool `
11- - Upgrading: ` uv add --dev package -- upgrade-package package `
9+ - Installation: ` uv add < package> `
10+ - Running tools: ` uv run < tool> `
11+ - Upgrading: ` uv lock --upgrade-package < package> `
1212 - FORBIDDEN: ` uv pip install ` , ` @latest ` syntax
1313
14142 . Code Quality
@@ -21,6 +21,7 @@ This document contains critical information about working with this codebase. Fo
21213 . Testing Requirements
2222 - Framework: ` uv run --frozen pytest `
2323 - Async testing: use anyio, not asyncio
24+ - Do not use ` Test ` prefixed classes, use functions
2425 - Coverage: test edge cases and errors
2526 - New features require tests
2627 - Bug fixes require regression tests
@@ -51,6 +52,17 @@ This document contains critical information about working with this codebase. Fo
5152- NEVER ever mention a ` co-authored-by ` or similar aspects. In particular, never
5253 mention the tool used to create the commit message or PR.
5354
55+ ## Breaking Changes
56+
57+ When making breaking changes, document them in ` docs/migration.md ` . Include:
58+
59+ - What changed
60+ - Why it changed
61+ - How to migrate existing code
62+
63+ Search for related sections in the migration guide and group related changes together
64+ rather than adding new standalone sections.
65+
5466## Python Tools
5567
5668## Code Formatting
@@ -66,12 +78,11 @@ This document contains critical information about working with this codebase. Fo
6678 - Line wrapping:
6779 - Strings: use parentheses
6880 - Function calls: multi-line with proper indent
69- - Imports: split into multiple lines
81+ - Imports: try to use a single line
7082
71832 . Type Checking
7284 - Tool: ` uv run --frozen pyright `
7385 - Requirements:
74- - Explicit None checks for Optional
7586 - Type narrowing for strings
7687 - Version warnings can be ignored if checks pass
7788
@@ -106,10 +117,6 @@ This document contains critical information about working with this codebase. Fo
106117 - Add None checks
107118 - Narrow string types
108119 - Match existing patterns
109- - Pytest:
110- - If the tests aren't finding the anyio pytest mark, try adding PYTEST_DISABLE_PLUGIN_AUTOLOAD=""
111- to the start of the pytest run command eg:
112- ` PYTEST_DISABLE_PLUGIN_AUTOLOAD="" uv run --frozen pytest `
113120
1141213 . Best Practices
115122 - Check git status before commits
@@ -127,6 +134,4 @@ This document contains critical information about working with this codebase. Fo
127134 - File ops: ` except (OSError, PermissionError): `
128135 - JSON: ` except json.JSONDecodeError: `
129136 - Network: ` except (ConnectionError, TimeoutError): `
130- - ** Only catch ` Exception ` for** :
131- - Top-level handlers that must not crash
132- - Cleanup blocks (log at debug level)
137+ - ** FORBIDDEN** ` except Exception: ` - unless in top-level handlers
0 commit comments