From fd8fe496ee6941d7c17e92913bf925188b505913 Mon Sep 17 00:00:00 2001 From: Mathieu Kniewallner Date: Sun, 11 Aug 2024 01:39:53 +0200 Subject: [PATCH] chore: few tweaks on linters and Cargo (#814) * chore(ruff): fully rely on `requires-python` As mentioned in https://docs.astral.sh/ruff/settings/#target-version, Ruff can read `requires-python` to determine the minimum Python version. This is one less reference to upgrade when we drop support for a Python version. * chore(cargo): depend on exact versions * chore(mypy): remove obsolete `show_error_codes` It is already enabled by default. * chore(ruff): remove `E731` ignore --- Cargo.toml | 20 ++++++++++---------- pyproject.toml | 6 +----- renovate.json5 | 1 - 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5c5b9b44..63b24eba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,20 +9,20 @@ name = "deptry" crate-type = ["cdylib"] [dependencies] -chardetng = "0.1.17" -encoding_rs = "0.8.34" -ignore = "0.4.22" -log = "0.4.22" -path-slash = "0.2.1" -pyo3 = { version = "0.22.2", features = ["abi3-py38", "generate-import-lib"] } -pyo3-log = "0.11.0" -rayon = "1.10.0" -regex = "1.10.6" +chardetng = "=0.1.17" +encoding_rs = "=0.8.34" +ignore = "=0.4.22" +log = "=0.4.22" +path-slash = "=0.2.1" +pyo3 = { version = "=0.22.2", features = ["abi3-py38", "generate-import-lib"] } +pyo3-log = "=0.11.0" +rayon = "=1.10.0" +regex = "=1.10.6" ruff_python_ast = { git = "https://github.com/astral-sh/ruff", tag = "0.5.7" } ruff_python_parser = { git = "https://github.com/astral-sh/ruff", tag = "0.5.7" } ruff_source_file = { git = "https://github.com/astral-sh/ruff", tag = "0.5.7" } ruff_text_size = { git = "https://github.com/astral-sh/ruff", tag = "0.5.7" } -serde_json = "1.0.122" +serde_json = "=1.0.122" [profile.release] lto = true diff --git a/pyproject.toml b/pyproject.toml index 232211b6..cd5b46ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -106,7 +106,6 @@ enable_error_code = [ strict = true warn_unreachable = true pretty = true -show_error_codes = true [[tool.mypy.overrides]] module = ["xdist.*"] @@ -128,7 +127,6 @@ filterwarnings = ["error"] norecursedirs = ["data*"] [tool.ruff] -target-version = "py38" line-length = 120 fix = true extend-exclude = ["tests/data/*"] @@ -186,10 +184,8 @@ select = [ "TRY", ] ignore = [ - # LineTooLong + # line-too-long (https://docs.astral.sh/ruff/rules/line-too-long/) "E501", - # DoNotAssignLambda - "E731", ] [tool.ruff.lint.flake8-type-checking] diff --git a/renovate.json5 b/renovate.json5 index 2027266f..ef2096e9 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -37,7 +37,6 @@ // https://docs.renovatebot.com/configuration-options/#lockfilemaintenance lockFileMaintenance: { enabled: true, - enabledManagers: ["pep621"], schedule: ["before 5am on saturday"], },