참고소스 수정본
This commit is contained in:
16
참고/ontocast-main/.cursor/rules/python-style.mdc
Normal file
16
참고/ontocast-main/.cursor/rules/python-style.mdc
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
description: "Follow project style guidelines for Python code"
|
||||
globs:
|
||||
- "**/*.py"
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
# Python Coding Rules
|
||||
- Use python 3.12 conventions: use `type | None` instead of `Optional` etc
|
||||
- Use type hints everywhere (PEP 484).
|
||||
- Use snake_case for functions and variables, PascalCase for classes.
|
||||
- Use `pydantic.BaseModel` for structured data, not dataclasses
|
||||
- Avoid unused imports.
|
||||
- Use `async`/`await` where appropriate.
|
||||
- Always keep functions small and composable.
|
||||
- Avoid using hasattr at all costs, it's not safe
|
||||
Reference in New Issue
Block a user