General
PromptBeginner5 minmarkdown
2. Apply Deepthink Protocol (reason about dependencies
risks
16
generic skill
Sign in to like and favorite skills
When modifying Python files, always run ruff checks and formatting:
uvx ruff check <path/to/file.py>
uvx ruff format <path/to/file.py>
uvx ruff check <path/to/file.py>
If ruff reports line length violations (E501), fix them by:
Breaking long strings into multiple lines:
# Bad raise HTTPException(detail="This is a very long error message that exceeds the limit") # Good raise HTTPException( detail=( "This is a very long error message " "that is now split across lines" ) )
Breaking long f-strings:
# Bad logger.info(f"Processing {count} items for user {user_id} with status {status}") # Good logger.info( f"Processing {count} items for user {user_id} " f"with status {status}" )
Breaking long function calls:
# Bad result = some_function(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) # Good result = some_function( arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 )
All checks passed!)