Skip to content

Commit

Permalink
Upgrade ruff in pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrist committed Oct 25, 2024
1 parent 07e2abd commit 76cbca6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
8 changes: 2 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.2
rev: v0.7.1
hooks:
- id: ruff
language_version: python3

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.2
hooks:
args: [ --fix ]
- id: ruff-format

- repo: https://github.com/codespell-project/codespell
Expand Down
1 change: 1 addition & 0 deletions benchmarks/bench_gc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Time for a single full GC pass over all the data.
- Amount of memory used to hold all the data
"""

import gc
import sys
import time
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ exclude = [
"test_JSONTestSuite.py",
"conf.py",
]
line-length = 88

[tool.ruff.lint]
ignore = [
"E721", # Comparing types instead of isinstance
"E741", # Ambiguous variable names
Expand All @@ -21,7 +24,6 @@ select = [
"F", # Pyflakes
"W", # PEP8 Warnings
]
line-length = 88

[tool.ruff.isort]
[tool.ruff.lint.isort]
combine-as-imports = true
1 change: 1 addition & 0 deletions scripts/generate_atof_consts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This script generates msgspec/atof_consts.h"""

import math
import os
import textwrap
Expand Down
3 changes: 1 addition & 2 deletions tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,7 @@ def test_uuid_disabled(self):
convert(typ(u.bytes), uuid.UUID, builtin_types=(uuid.UUID,))

def test_convert_uuid_subclass(self):
class UUID2(uuid.UUID):
...
class UUID2(uuid.UUID): ...

u1 = uuid.uuid4()
u2 = UUID2(str(u1))
Expand Down

0 comments on commit 76cbca6

Please sign in to comment.