Initial commit
This commit is contained in:
commit
2461a6b6fa
49 files changed
+3170
No files matched your search
@@ -0,0 +1,18 @@
|
||||
---
|
||||
description: Python style — PEP 8, typing, and safe patterns
|
||||
globs: **/*.py
|
||||
alwaysApply: false
|
||||
---
|
||||
|
||||
# Python Standards
|
||||
|
||||
- Follow PEP 8. Use 4-space indentation and `snake_case` for functions/variables.
|
||||
- Add type hints to all public function signatures and return types.
|
||||
- Use `pathlib.Path` instead of string path concatenation.
|
||||
- Prefer f-strings over `.format()` or `%` formatting.
|
||||
- Use context managers (`with`) for files, DB connections, and locks.
|
||||
- Catch specific exceptions; never use bare `except:` or `except Exception:` without re-raising.
|
||||
- Use `logging` instead of `print()` in application code.
|
||||
- Virtual environments: never commit `venv/` or `__pycache__/`.
|
||||
- Prefer `dataclasses` or `pydantic` models over untyped dicts for structured data.
|
||||
- Use `if __name__ == "__main__":` guards in runnable scripts.
|
||||
Reference in new issue
Block a user