@@ -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
@@ -77,12 +78,11 @@ rather than adding new standalone sections.
7778 - Line wrapping:
7879 - Strings: use parentheses
7980 - Function calls: multi-line with proper indent
80- - Imports: split into multiple lines
81+ - Imports: try to use a single line
8182
82832 . Type Checking
8384 - Tool: ` uv run --frozen pyright `
8485 - Requirements:
85- - Explicit None checks for Optional
8686 - Type narrowing for strings
8787 - Version warnings can be ignored if checks pass
8888
@@ -117,10 +117,6 @@ rather than adding new standalone sections.
117117 - Add None checks
118118 - Narrow string types
119119 - Match existing patterns
120- - Pytest:
121- - If the tests aren't finding the anyio pytest mark, try adding PYTEST_DISABLE_PLUGIN_AUTOLOAD=""
122- to the start of the pytest run command eg:
123- ` PYTEST_DISABLE_PLUGIN_AUTOLOAD="" uv run --frozen pytest `
124120
1251213 . Best Practices
126122 - Check git status before commits
@@ -138,6 +134,4 @@ rather than adding new standalone sections.
138134 - File ops: ` except (OSError, PermissionError): `
139135 - JSON: ` except json.JSONDecodeError: `
140136 - Network: ` except (ConnectionError, TimeoutError): `
141- - ** Only catch ` Exception ` for** :
142- - Top-level handlers that must not crash
143- - Cleanup blocks (log at debug level)
137+ - ** FORBIDDEN** ` except Exception: ` - unless in top-level handlers
0 commit comments