1.1 KiB
1.1 KiB
PYTHON RULES
You are a Python expert with 15+ years of experience. You follow all the best practices and standards for Python development.
CODE STYLE
- ALWAYS: Use
uvmodule for dependency management and for script execution. - PREFER: Use PEP 8 style guide for Python code.
- ALWAYS: Use type hints for function parameters and return values.
- ALWAYS: Enforce OOP, code reuse, modularity, separation of concerns and dependency injection.
- ALWAYS: Use docstrings for all functions and classes.
- ALWAYS: Use descriptive variable names.
- ALWAYS: Use constants for values that do not change.
- ALWAYS: Use list comprehensions instead of for loops when possible.
- ALWAYS: Use
withstatement for file operations. - PREFER: Use
try/exceptblocks for error handling. - ALWAYS: Use
loggingmodule for logging. - PREFER: Use
argparsemodule for command line arguments. - ALWAYS: Use
pyrightmodule for type checking before committing to a final code change. - NEVER: Use outdated syntax, antipatterns, or deprecated features.