Skip to content

Commit 8463a6a

Browse files
Require recent ruff version, get rid of ASYNC101 (#1864)
ASYNC101 has been split into ASYNC220, ASYNC221, ASYNC230, and ASYNC251: https://astral.sh/blog/ruff-v0.5.0#rule-remappings
1 parent 01ecda4 commit 8463a6a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repos:
1414
- id: check-yaml
1515
- repo: https://github.com/astral-sh/ruff-pre-commit
1616
# Ruff version.
17-
rev: v0.9.2
17+
rev: v0.11.13
1818
hooks:
1919
# Run the linter.
2020
- id: ruff

fsspec/implementations/http.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ async def _get_file(
254254
if isfilelike(lpath):
255255
outfile = lpath
256256
else:
257-
outfile = open(lpath, "wb") # noqa: ASYNC101, ASYNC230
257+
outfile = open(lpath, "wb") # noqa: ASYNC230
258258

259259
try:
260260
chunk = True
@@ -286,7 +286,7 @@ async def gen_chunks():
286286
context = nullcontext(lpath)
287287
use_seek = False # might not support seeking
288288
else:
289-
context = open(lpath, "rb") # noqa: ASYNC101, ASYNC230
289+
context = open(lpath, "rb") # noqa: ASYNC230
290290
use_seek = True
291291

292292
with context as f:
@@ -812,7 +812,7 @@ async def get_range(session, url, start, end, file=None, **kwargs):
812812
async with r:
813813
out = await r.read()
814814
if file:
815-
with open(file, "r+b") as f: # noqa: ASYNC101, ASYNC230
815+
with open(file, "r+b") as f: # noqa: ASYNC230
816816
f.seek(start)
817817
f.write(out)
818818
else:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ abfs = ["adlfs"]
2828
adl = ["adlfs"]
2929
arrow = ["pyarrow >= 1"]
3030
dask = ["dask", "distributed"]
31-
dev = ["ruff", "pre-commit"]
31+
dev = ["ruff >= 0.5", "pre-commit"]
3232
doc = ["sphinx", "numpydoc", "sphinx-design", "sphinx-rtd-theme", "yarl"]
3333
dropbox = ["dropbox", "dropboxdrivefs", "requests"]
3434
entrypoints = []

0 commit comments

Comments
 (0)