Skip to content

refactor: add ruff rules for sorting imports#35

Open
rchl wants to merge 2 commits intomasterfrom
refactor/import-sort
Open

refactor: add ruff rules for sorting imports#35
rchl wants to merge 2 commits intomasterfrom
refactor/import-sort

Conversation

@rchl
Copy link
Copy Markdown
Member

@rchl rchl commented Mar 31, 2026

This is a semi-automatically created PR that adds ruff configuration for imports formatting.

It matches configuration included in the LSP package with the intention of consolidating import style across all LSP packages.

If you have strong preference to a different style, please keep the configuration but update it to your liking so that anyone working on the package does not have to guess the correct style to use. See ruff isort settings.

(Since this PR was created semi-automatically, it might require some changes before being considered ready.)

import json
import os
import shutil
import sublime
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH, I prefer import statements in front of from ... and the grouping of global (stdlib) vs. local imports.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I said in the PR description, if you don't agree with aligning with LSP style then it's an option to adapt rules to the style you prefer.

@rchl rchl force-pushed the refactor/import-sort branch from ddecc75 to 76feded Compare April 4, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants