From cbb22f0fa380f94aa2e756bdbccb56396b10e1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lker=20SI=C4=9EIRCI?= Date: Sun, 4 Aug 2024 01:25:12 +0300 Subject: [PATCH] update ruff to support native language server --- .pre-commit-config.yaml | 2 +- .vscode/settings.json | 1 + Makefile | 2 +- pyproject.toml | 4 ++-- requirements-dev.lock | 4 +++- requirements.lock | 2 ++ 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5125853..26c3a64 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: - id: python-use-type-annotations - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.4.2 + rev: v0.5.6 hooks: # Run the Ruff linter. - id: ruff diff --git a/.vscode/settings.json b/.vscode/settings.json index 64ee0ab..82a4af4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,6 +15,7 @@ }, "python.languageServer": "Pylance", // "python.analysis.autoImportCompletions": true, + "ruff.nativeServer": "on", "autoDocstring.generateDocstringOnEnter": true, "autoDocstring.docstringFormat": "google", "autoDocstring.customTemplatePath": "docs/templates/google-notypes.mustache", diff --git a/Makefile b/Makefile index 72b5a58..e5c6d8f 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ install-precommit: ## Install pre-commit hooks pre-commit install install-lint: - pip install ruff==0.4.2 + pip install ruff==0.5.6 install-doc: pip install mkdocs mkdocs-material mkdocstrings[python] diff --git a/pyproject.toml b/pyproject.toml index 55e510a..55a6a41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [] managed = true dev-dependencies = [ "pre-commit", - "ruff==0.4.2", + "ruff==0.5.6", "mypy", "scalene~=1.5.21.2", ## DOCS @@ -89,7 +89,7 @@ log_cli_format = "%(asctime)-20s :: %(name)-8s :: %(levelname)-8s :: %(filename) log_cli_date_format = "%Y-%m-%d %H:%M:%S" [tool.ruff] -target-version = "py310" +target-version = "py311" line-length = 88 src = ["src"] respect-gitignore = true diff --git a/requirements-dev.lock b/requirements-dev.lock index e082c97..16d5130 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -6,6 +6,8 @@ # features: [] # all-features: false # with-sources: false +# generate-hashes: false +# universal: false -e file:. asttokens==2.4.1 @@ -176,7 +178,7 @@ requests==2.31.0 # via mkdocs-material rich==13.7.1 # via scalene -ruff==0.4.2 +ruff==0.5.6 scalene==1.5.21.4 setuptools==69.5.1 # via nodeenv diff --git a/requirements.lock b/requirements.lock index 8f23096..505fd45 100644 --- a/requirements.lock +++ b/requirements.lock @@ -6,5 +6,7 @@ # features: [] # all-features: false # with-sources: false +# generate-hashes: false +# universal: false -e file:.