Skip to content

Commit

Permalink
Pre-commit: Tighten up ruff rules (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Dec 16, 2024
1 parent 902c495 commit 10b9b69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
5 changes: 2 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.6.9"
rev: "v0.8.3"
hooks:
- id: ruff
args: [--fix]
Expand All @@ -29,14 +29,13 @@ repos:
- id: black

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.11.2"
rev: "v1.13.0"
hooks:
- id: mypy
args: []
additional_dependencies: &mypy-deps
- pytest


- repo: https://github.com/codespell-project/codespell
rev: "v2.3.0"
hooks:
Expand Down
13 changes: 3 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ test = [
"pyodide-lock==v0.1.0a8",
]


[project.urls]
"Homepage" = "https://github.com/pyodide/micropip"
"Bug Tracker" = "https://github.com/pyodide/micropip/issues"



[build-system]
requires = ["setuptools>=42", "setuptools_scm[toml]>=6.2", "wheel"]

Expand All @@ -41,23 +39,18 @@ build-backend = "setuptools.build_meta"
write_to = "micropip/_version.py"

[tool.ruff]
line-length = 122
lint.select = [
"E", # pycodestyles
"W", # pycodestyles
"F", # pyflakes
"B0", # bugbear (all B0* checks enabled by default)
"B904", # bugbear (Within an except clause, raise exceptions with raise ... from err)
"B905", # bugbear (zip() without an explicit strict= parameter set.)
"B", # bugbear
"UP", # pyupgrade
"I", # isort
"PGH", # pygrep-hooks
"G", # flake8-logging-format
]
# Remove E999 once pattern matching is supported
# https://github.com/charliermarsh/ruff/issues/282
lint.ignore = ["E402", "E501", "E731", "E741", "E999"]
target-version = "py311"

target-version = "py312"

[tool.ruff.lint.isort]
known-first-party = [
Expand Down

0 comments on commit 10b9b69

Please sign in to comment.