返回 Skill 列表
extension
分类: 开发与工程无需 API Key

python-linting

此技能使用ruff帮助检查Python代码。当用户要求“检查代码”、“检查代码质量”或“修复样式问题”时使用。

person作者: jakexiaohubgithub

Python Linting Skill

This skill provides instructions for linting Python code using ruff.

How to Lint

Run ruff to check for issues:

ruff check .

To automatically fix issues:

ruff check --fix .

Common Options

  • --select E,W - Only check for errors and warnings
  • --ignore E501 - Ignore line length errors
  • --fix - Automatically fix fixable issues

Example Output

example.py:1:1: F401 [*] `os` imported but unused
example.py:5:5: E302 Expected 2 blank lines, found 1
Found 2 errors (1 fixable).