Skip to content

Commit

Permalink
chore: bump python-lsp-ruff from 1.6.0 to 2.0.2 (#150)
Browse files Browse the repository at this point in the history
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rafal Chlodnicki <[email protected]>
  • Loading branch information
dependabot[bot] and rchl authored Jan 12, 2024
1 parent d82cb9e commit a28f4f2
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 32 deletions.
41 changes: 21 additions & 20 deletions LSP-pylsp.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -221,34 +221,35 @@
// --- ruff settings ---
// Note that any configuration options (except for `extendIgnore` and `extendSelect`) passed to ruff via pylsp
// are ignored if the project has a pyproject.toml.
// See also ruff documenation https://beta.ruff.rs/docs/configuration/
// See also ruff documenation https://docs.astral.sh/ruff/configuration/
//
// Path to optional pyproject.toml file.
"pylsp.plugins.ruff.config": null,
// Exclude files from being checked by ruff.
"pylsp.plugins.ruff.exclude": null,
// Path to the ruff executable.
"pylsp.plugins.ruff.executable": "ruff",
// Error codes to ignore.
"pylsp.plugins.ruff.ignore": null,
// Same as ignore, but append to existing ignores.
"pylsp.plugins.ruff.extendIgnore": null,
// List of error codes to fix during formatting. The default is `["I"]`, any additional codes are appended to
// this list. Note that you might also want to add `"I"` in the `pylsp.plugins.ruff.extendSelect` option for
// import sorting to work.
"pylsp.plugins.ruff.format": [],
// Set the line-length for length checks.
"pylsp.plugins.ruff.lineLength": null,
// File-specific error codes to be ignored.
"pylsp.plugins.ruff.perFileIgnores": {},
// Custom config for `ruff` to use.
"pylsp.plugins.ruff.path": null,
// Custom path to `ruff`.
"pylsp.plugins.ruff.executable": null,
// A list of rule codes or prefixes to enable. Prefixes can specify exact rules (like F841),
// entire categories (like F), or anything in between.
// When breaking ties between enabled and disabled rules (via select and ignore, respectively),
// more specific prefixes override less specific prefixes.
// See all supported rule codes at https://beta.ruff.rs/docs/rules/
// See all supported rule codes at https://docs.astral.sh/ruff/rules/
"pylsp.plugins.ruff.select": ["E", "F"],
// Same as select, but append to existing error codes.
"pylsp.plugins.ruff.extendSelect": null,
// Exclude files from being checked by ruff.
"pylsp.plugins.ruff.exclude": null,
// Rules to be ignored by `ruff`.
"pylsp.plugins.ruff.ignore": null,
// Rules that are additionally ignored by `ruff`.
"pylsp.plugins.ruff.extendIgnore": null,
// Rules that are marked as fixable by `ruff` that should be fixed when running `textDocument/formatting`.
// The default is `["I"]`, any additional codes are appended to this list. Note that you might also want to
// add `"I"` in the `pylsp.plugins.ruff.extendSelect` option for import sorting to work.
"pylsp.plugins.ruff.format": ["I"],
// Line length to pass to `ruff` checking and formatting.
"pylsp.plugins.ruff.lineLength": null,
// Rules that should be ignored for specific files.
// A list of mappings from file pattern to rule code or prefixes to exclude, when considering any matching files.
"pylsp.plugins.ruff.perFileIgnores": null,
// Dictionary of custom severity levels for specific codes, see https://github.com/python-lsp/python-lsp-ruff#custom-severities.
"pylsp.plugins.ruff.severities": null,

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ mypy==1.8.0
pyls-isort==0.2.2
pylsp-mypy==0.6.8
python-lsp-black==2.0.0
python-lsp-ruff==1.6.0
python-lsp-ruff==2.0.2
python-lsp-server[all]==1.8.2
27 changes: 16 additions & 11 deletions sublime-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -590,18 +590,21 @@
"default": false,
"markdownDescription": "When enabling, it's recommended to disable `flake8`, `pycodestyle`, `pyflakes`, `mccabe` and `pyls_isort` plugins."
},
"pylsp.plugins.ruff.config": {
"pylsp.plugins.ruff.path": {
"type": [
"string",
"null"
],
"default": null,
"markdownDescription": "Path to optional `pyproject.toml` file.\n\nNote that if a `pyproject.toml` file is present in the project, python-lsp-ruff will use these configuration options and this option will be ignored."
"markdownDescription": "Custom config for `ruff` to use."
},
"pylsp.plugins.ruff.executable": {
"type": "string",
"default": "ruff",
"markdownDescription": "Path to the `ruff` executable."
"type": [
"string",
"null"
],
"default": null,
"markdownDescription": "Custom path to `ruff`."
},
"pylsp.plugins.ruff.exclude": {
"type": [
Expand Down Expand Up @@ -633,7 +636,7 @@
}
],
"default": null,
"markdownDescription": "Error codes to ignore."
"markdownDescription": "Rules to be ignored by `ruff`."
},
"pylsp.plugins.ruff.extendIgnore": {
"type": [
Expand All @@ -649,23 +652,25 @@
"body": ["E501"]
}
],
"markdownDescription": "Same as `ignore`, but append to existing ignores."
"markdownDescription": "Rules that are additionally ignored by `ruff`."
},
"pylsp.plugins.ruff.format": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"markdownDescription": "List of error codes to fix during formatting. The default is `[\"I\"]`, any additional codes are appended to this list. Note that you might also want to add `\"I\"` in the `pylsp.plugins.ruff.extendSelect` option for import sorting to work."
"default": [
"I"
],
"markdownDescription": "Rules that are marked as fixable by `ruff` that should be fixed when running `textDocument/formatting`. The default is `[\"I\"]`, any additional codes are appended to this list. Note that you might also want to add `\"I\"` in the `pylsp.plugins.ruff.extendSelect` option for import sorting to work."
},
"pylsp.plugins.ruff.lineLength": {
"type": [
"number",
"null"
],
"default": null,
"markdownDescription": "The line length to use when enforcing long-lines violations (like `E501`)."
"markdownDescription": "Line length to pass to `ruff` checking and formatting."
},
"pylsp.plugins.ruff.perFileIgnores": {
"type": [
Expand All @@ -680,7 +685,7 @@
}
}
],
"markdownDescription": "A list of mappings from file pattern to rule codes or prefixes to exclude, when considering any matching files."
"markdownDescription": "Rules that should be ignored for specific files. A list of mappings from file pattern to rule code or prefixes to exclude, when considering any matching files."
},
"pylsp.plugins.ruff.select": {
"type": [
Expand Down

0 comments on commit a28f4f2

Please sign in to comment.