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 ed5014d commit df87d17
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,24 +85,24 @@ python = "3.12"

[tool.hatch.envs.lint]
dependencies = [
"ruff>=0.1.3",
"ruff>=0.2.0",
"mypy",
"pyproject-fmt",
"types-xmltodict",
]

[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_xml",
"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_xml",
"mypy tests",
"shellcheck workflow-support/*.sh",
Expand Down Expand Up @@ -176,12 +176,11 @@ replacement = "[#\\1](https://github.com/kpfleming/jinjanator-plugin-format-xml/

[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 @@ -201,7 +200,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 df87d17

Please sign in to comment.