Skip to content

Commit

Permalink
chore: few tweaks on linters and Cargo (#814)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
mkniewallner authored Aug 10, 2024
1 parent fb09300 commit fd8fe49
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ enable_error_code = [
strict = true
warn_unreachable = true
pretty = true
show_error_codes = true

[[tool.mypy.overrides]]
module = ["xdist.*"]
Expand All @@ -128,7 +127,6 @@ filterwarnings = ["error"]
norecursedirs = ["data*"]

[tool.ruff]
target-version = "py38"
line-length = 120
fix = true
extend-exclude = ["tests/data/*"]
Expand Down Expand Up @@ -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]
Expand Down
1 change: 0 additions & 1 deletion renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
// https://docs.renovatebot.com/configuration-options/#lockfilemaintenance
lockFileMaintenance: {
enabled: true,
enabledManagers: ["pep621"],
schedule: ["before 5am on saturday"],
},

Expand Down

0 comments on commit fd8fe49

Please sign in to comment.