---
name: openhands-python-linting
description: "This skill helps lint Python code using ruff. Use when the user asks to \"lint\", \"check code quality\", or \"fix style issues\"."
license: "MIT"
metadata:
  decimalai-skill-id: "b1bca546-2357-430d-a824-54f25c079922"
  decimalai-version-id: "baf72450-4351-4878-9a0f-3fd4253adb8a"
  decimalai-version: "1"
  decimalai-body-sha256: "c22edae38fa8af23fd0a17823a5f2a166206e27774068d3a9db81233e3840d14"
  decimalai-name: "openhands/python-linting"
  decimalai-format: "1"
  decimalai-invocation: "model"
  decimalai-source: "https://app.decimal.ai/s/openhands-python-linting@1/SKILL.md"
---
# Python Linting Skill

This skill provides instructions for linting Python code using ruff.

## How to Lint

Run ruff to check for issues:

```bash
ruff check .
```

To automatically fix issues:

```bash
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).
```
