Skip to content

Commit

Permalink
Add target version and preview to formatter (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhossbach authored Nov 25, 2023
1 parent 5d7338d commit 8a0270c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pylsp_ruff/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,15 @@ def build_format_arguments(
if settings.exclude:
args.append(f"--exclude={','.join(settings.exclude)}")

if settings.preview:
args.append("--preview")

if settings.line_length:
args.append(f"--line-length={settings.line_length}")

if settings.target_version:
args.append(f"--target-version={settings.target_version}")

if extra_arguments:
args.extend(extra_arguments)

Expand Down

0 comments on commit 8a0270c

Please sign in to comment.