Skip to content

Commit

Permalink
Updates for Ruff 0.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
kpfleming committed Feb 4, 2024
1 parent a1c67af commit 9b8f5dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
repos:
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "1.5.1"
rev: "1.7.0"
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
rev: v0.2.0
hooks:
- id: ruff-format
- id: ruff
Expand Down
15 changes: 7 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ python = "3.12"

[tool.hatch.envs.lint]
dependencies = [
"ruff>=0.1.3",
"ruff>=0.2.0",
"mypy",
"pyproject-fmt",
# tomli has to be installed because mypy has been told to simulate Python 3.8
Expand All @@ -94,16 +94,16 @@ dependencies = [

[tool.hatch.envs.lint.scripts]
lint = [
"ruff format .",
"ruff check --output-format=grouped --fix --show-source --show-fixes .",
"ruff format",
"ruff check --output-format=full --fix --show-fixes",
"mypy --package jinjanator_plugin_format_toml",
"mypy tests",
"shellcheck workflow-support/*.sh",
"pyproject-fmt pyproject.toml",
]
lint-action = [
"ruff format --check --diff .",
"ruff check --output-format=github .",
"ruff format --check --diff",
"ruff check --output-format=github",
"mypy --package jinjanator_plugin_format_toml",
"mypy tests",
"shellcheck workflow-support/*.sh",
Expand Down Expand Up @@ -177,12 +177,11 @@ replacement = "[#\\1](https://github.com/kpfleming/jinjanator-plugin-format-toml

[tool.ruff]
src = ["src", "tests"]
ignore-init-module-imports = true
line-length = 100

[tool.ruff.lint]
ignore-init-module-imports = true
select = ["ALL"]

ignore = [
"ANN", # Mypy is better at this.
"COM812", # conflicts with formatter
Expand All @@ -202,7 +201,7 @@ unfixable = ["F401"]
"SIM300", # Yoda rocks in tests
]

[tool.ruff.isort]
[tool.ruff.lint.isort]
lines-between-types = 1
lines-after-imports = 2

Expand Down

0 comments on commit 9b8f5dd

Please sign in to comment.