language: python
file_extensions:
- py
- pyi
- pyw
parser_plugin: tree-sitter-python
diagnostic_rules:
- name: unused_imports
pattern: "^import|^from.*import"
severity: warning
message: "Unused import"
fix_template: "Remove import"
- name: unused_variables
pattern: "^\\s*\\w+\\s*="
severity: warning
message: "Unused variable"
fix_template: "Prefix with underscore"
- name: missing_docstring
pattern: "^\\s*(def|class)\\s+\\w+"
severity: hint
message: "Missing docstring"
fix_template: "Add docstring"
code_actions:
- name: add_docstring
title: "Add docstring"
kind: quickfix
transformation: "Add triple-quoted docstring"
- name: remove_unused_import
title: "Remove unused import"
kind: quickfix
transformation: "Delete import line"
- name: add_type_hints
title: "Add type hints"
kind: quickfix
transformation: "Add type annotations"