1.6 KiB
1.6 KiB
Ruff Lint Checker
Run piker’s ruff config against staged files, specific paths, or the full codebase.
Available scripts
scripts/check.py— self-contained (PEP 723) wrapper aroundruff checkthat defaults to staged files and uses the project’sruff.toml.
Usage
# check staged Python files (default)
python3 scripts/check.py
# check full codebase
python3 scripts/check.py --all
# auto-fix fixable violations
python3 scripts/check.py --fix
# preview fixes without applying
python3 scripts/check.py --diff
# show per-rule violation counts
python3 scripts/check.py --stats
# check specific files
python3 scripts/check.py piker/ui/_style.pyCommon violations
| Rule | Meaning | Fixable? |
|---|---|---|
| D213 | summary not on 2nd line after ''' |
yes |
| D205 | no blank line after summary | no |
| D204 | no blank line after class docstring | yes |
| D209 | closing quotes not on own line | yes |
| D200 | ignored — piker always multiline | n/a |
| W291 | trailing whitespace | yes |
Fixing D213 (most common)
Convert this:
"""Summary on first line."""To piker’s ''' multiline style:
'''
Summary on second line.
'''For D205, insert a blank line between the summary and description paragraphs inside the docstring.