Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
A Visual Studio Code extension with support for the [Ruff](https://github.com/charliermarsh/ruff)
linter. Available on the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff).

The extension ships with `ruff==0.0.190`.
The extension ships with `ruff==0.0.192`.

(Interested in using [Ruff](https://github.com/charliermarsh/ruff) with another editor? Check out
[`ruff-lsp`](https://github.com/charliermarsh/ruff-lsp).)
Expand Down
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,18 @@
],
"scope": "machine",
"type": "string"
},
"ruff.organizeImports": {
"default": true,
"description": "Whether to register Ruff as capable of handling `source.organizeImports` actions.",
"scope": "window",
"type": "boolean"
},
"ruff.fixAll": {
"default": true,
"description": "Whether to register Ruff as capable of handling `source.fixAll` actions.",
"scope": "window",
"type": "boolean"
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is used to generate requirements.txt.

ruff-lsp==0.0.6
ruff==0.0.190
ruff-lsp==0.0.8
ruff==0.0.192
40 changes: 20 additions & 20 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,29 @@ pygls==1.0.0 \
--hash=sha256:3414594ac29ff3ab990f004c675d1077e4e2659eae5cc3ae67cc6fa4d861e342 \
--hash=sha256:c2a1c22e30028f7ca9d3f0a04da8eef29f0f1701bdbd97d8614d8e1e6711f336
# via ruff-lsp
ruff==0.0.190 \
--hash=sha256:23a950bf48ee1465ea32fb92da217e89062dcf49fc4b85cae2bb02bea20878d8 \
--hash=sha256:240492844090c30e4ed228c2c73ebd9d44e2e68e721eec839cb62790e506e473 \
--hash=sha256:2641e569effbccaa45698ba05e947481438a622a28c51c1870c769291a4bd8ad \
--hash=sha256:2efb529dbb21f6b5a9d981ad1e9697ce6b063cc1682aa00abc8a54105c47eeaa \
--hash=sha256:4072ae5578c7538c45ed418305080db88c91f303b9c69b2989ce2c5cfa2de2b8 \
--hash=sha256:5ba1e32da0957fdc7d11f45a54fd7eb96b2f136e74c3779202ac024a85cb50a8 \
--hash=sha256:687493145f6e739de78a2a496a4bda7a41c6b574d594317ced595a9cbb876633 \
--hash=sha256:76e377aa3d2267b241e2d66fddf6bfd5ec4c9869d5031051f8e54e88f8993e5c \
--hash=sha256:80dae5084fcd14e883a8e2b1b37e05f7e2bc82278800b1a45544d427059e41e8 \
--hash=sha256:8ed60aab401a14f949bfa0e2241546b21f5be617a06a3d074bdd519f8399728f \
--hash=sha256:9bd3bd8826437270f0d03d3f6b12172c93720332a8e3229268b0c9795e872023 \
--hash=sha256:a778a1c25a50b0d1270242efee4b5e276cb0a78736826fa21f4be66af0201778 \
--hash=sha256:d231124b4c88f6032c3e1834e26289b628147124ac8fed86100b86108e1f4bd8 \
--hash=sha256:d8eeddbbf871de451dd238f6bcee688da63187e3ab72c6438be1ab3cd94be72d \
--hash=sha256:e5c9aa23cff7eb7408a3ca0568b12f561a5678f6420563b94ba8eb8c2f3a5d6b \
--hash=sha256:fa69edffffaadb5c12a7a3b5cfcc27158a169b36128e63a827ab568b56d0e45b
ruff==0.0.192 \
--hash=sha256:03921ceae167be1733be9b50774627a3a5874e0d0db6d0f3d22cb7d4ec0bc50d \
--hash=sha256:113562bc3298b680df41c4a26fb55d10ed6e38432e987437302e8959a26ca8f5 \
--hash=sha256:340ea45b619a6729e518658bbd11b3650d1de89f87e01334d36f8f22c454fe89 \
--hash=sha256:51ffca9d10f139932479c5ca3838b5194ccef534677969e21b368daee5e13bca \
--hash=sha256:6623a936cfc2547a9abbb888c9d5ffcae06897306b2649c4700a2f33bd08ada6 \
--hash=sha256:6bd9410f10fa3efbf34ef45afae8064c7e8fddcc3ea0c1755f4e2d12c0a197e5 \
--hash=sha256:71d49353a7e8799bc879df9cc17e2f2a8664240617b25a11db517d97ed65b377 \
--hash=sha256:8661c278c6a9dd059e1327d1f4b9ea1e749da6e26b77e567f1566d31d561868a \
--hash=sha256:a6b6863dcbac58666b87b840fd92a49a8791ee9c52bca2cc33e480380e6bf50d \
--hash=sha256:a7ecadd76b938c3b05f74d4223fa7cf443563086cbdfae2189220c3be0bde648 \
--hash=sha256:c3f79b3469b28961ea1737de1b2aa0e001c0f0d16fa17ead8fcfa7b9fbcd25d1 \
--hash=sha256:de4a29092aa026a484e174acb1ddc92c752836daebd4fb6d94078986531a2f4d \
--hash=sha256:e054e307f53af0db530eb1f8a810edd671561b512cf17954f8842bf7d786153b \
--hash=sha256:e41e8492413b17451eb5ffee07339dbbd6c7b89a6c968b4fcb7f1188505f418a \
--hash=sha256:eac8b1447b82744aa6d64303be081227bbc9a6c3577c793f4cf8ed5c09decb71 \
--hash=sha256:fb60b2ecba8e59ad553ba003dd529e716e1eef5cd660f1f94466765f57d60c17
# via
# -r ./requirements.in
# ruff-lsp
ruff-lsp==0.0.6 \
--hash=sha256:2297972d28e01be1d0b0804e18184723ad375dd097d9ef2d40b2448024b31fa3 \
--hash=sha256:e3e0577689bb9cb47894c53aff71b4de63c4320c1ee7074a832cdad3f9014028
ruff-lsp==0.0.8 \
--hash=sha256:5d3914751ef47dc086807eb8b6f1dc72ebdf6e29639822a38b2298acb6a6d0ea \
--hash=sha256:e7fafb162a85abcd814b8618cf69f3d7eb9238f0cbc209a64eb9568213cd17de
# via -r ./requirements.in
typeguard==2.13.3 \
--hash=sha256:00edaa8da3a133674796cf5ea87d9f4b4c367d77476e185e80251cc13dfbb8c4 \
Expand Down
6 changes: 6 additions & 0 deletions src/common/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export interface ISettings {
interpreter: string[];
importStrategy: string;
showNotifications: string;
organizeImports: boolean;
fixAll: boolean;
}

export async function getExtensionSettings(namespace: string): Promise<ISettings[]> {
Expand Down Expand Up @@ -49,6 +51,8 @@ export async function getWorkspaceSettings(namespace: string, workspace: Workspa
interpreter: interpreter ?? [],
importStrategy: config.get<string>(`importStrategy`) ?? 'fromEnvironment',
showNotifications: config.get<string>(`showNotifications`) ?? 'off',
organizeImports: config.get<boolean>(`organizeImports`) ?? true,
fixAll: config.get<boolean>(`fixAll`) ?? true,
};
}

Expand All @@ -60,6 +64,8 @@ export function checkIfConfigurationChanged(e: ConfigurationChangeEvent, namespa
`${namespace}.interpreter`,
`${namespace}.importStrategy`,
`${namespace}.showNotifications`,
`${namespace}.organizeImports`,
`${namespace}.fixAll`,
];
return settings.some((s) => e.affectsConfiguration(s));
}