ワンクリックで
code-style
// Python code style and formatting standards using Ruff. Use when writing or reviewing Python code.
// Python code style and formatting standards using Ruff. Use when writing or reviewing Python code.
| name | code-style |
| description | Python code style and formatting standards using Ruff. Use when writing or reviewing Python code. |
ruff format .)snake_casePascalCaseUPPER_SNAKE_CASE_leading_underscoresnake_case.pyOptional[T] or T | None for nullable typeslist[T], dict[K, V] (lowercase) for Python 3.10+Example:
def calculate_total(items: list[Item], discount: float = 0.0) -> float:
"""Calculate the total price of items with optional discount.
Args:
items: List of items to calculate total for.
discount: Discount percentage to apply (0.0 to 1.0).
Returns:
The total price after discount.
Raises:
ValueError: If discount is not between 0 and 1.
"""
from x import *)ruff format .ruff check .ruff check --fix .Simplify and clean up code after changes are complete. Reduces complexity, improves readability, and ensures consistency.
Commit changes, push to remote, and create a pull request. Use for completing features or fixes ready for review.
Find and fix technical debt including duplicated code, dead code, outdated patterns, and code smells. Run at the end of sessions to clean up.
Git workflow and commit conventions. Use when committing code, creating branches, or making pull requests.
LLM and ML development best practices with LangChain and transformers. Use when building AI/ML applications.
Testing conventions using pytest. Use when writing tests, creating fixtures, or running test suites.