piker/.claude/skills/lint/SKILL.md

1.6 KiB
Raw Blame History

Ruff Lint Checker

Run pikers ruff config against staged files, specific paths, or the full codebase.

Available scripts

  • scripts/check.py — self-contained (PEP 723) wrapper around ruff check that defaults to staged files and uses the projects ruff.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.py

Common 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 pikers ''' multiline style:

'''
Summary on second line.

'''

For D205, insert a blank line between the summary and description paragraphs inside the docstring.