From 216885a806844e6c69854b226210055c46850c0e Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Thu, 16 Jan 2025 23:00:36 +0100 Subject: [PATCH] pre-commit autoupdate (#1774) --- .pre-commit-config.yaml | 2 +- fsspec/implementations/dbfs.py | 6 +++--- fsspec/implementations/tests/test_tar.py | 4 ++-- fsspec/registry.py | 6 +++--- pyproject.toml | 4 ---- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f1f11e947..acd9fa040 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: - id: check-yaml - repo: /~https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.6.9 + rev: v0.9.2 hooks: # Run the linter. - id: ruff diff --git a/fsspec/implementations/dbfs.py b/fsspec/implementations/dbfs.py index 30c2947b0..fa71e1a22 100644 --- a/fsspec/implementations/dbfs.py +++ b/fsspec/implementations/dbfs.py @@ -412,9 +412,9 @@ def __init__( if block_size is None or block_size == "default": block_size = self.DEFAULT_BLOCK_SIZE - assert ( - block_size == self.DEFAULT_BLOCK_SIZE - ), f"Only the default block size is allowed, not {block_size}" + assert block_size == self.DEFAULT_BLOCK_SIZE, ( + f"Only the default block size is allowed, not {block_size}" + ) super().__init__( fs, diff --git a/fsspec/implementations/tests/test_tar.py b/fsspec/implementations/tests/test_tar.py index e74f54dd0..2ead3096f 100644 --- a/fsspec/implementations/tests/test_tar.py +++ b/fsspec/implementations/tests/test_tar.py @@ -97,7 +97,7 @@ def test_filesystem_direct(recipe, tmpdir): Here: `LocalFileSystem`. """ - filename = os.path.join(tmpdir, f'temp{recipe["suffix"]}') + filename = os.path.join(tmpdir, f"temp{recipe['suffix']}") fs = fsspec.filesystem("file") f = OpenFile(fs, filename, mode="wb") @@ -132,7 +132,7 @@ def test_filesystem_cached(recipe, tmpdir): Here: `TarFileSystem` over `WholeFileCacheFileSystem` over `LocalFileSystem`. """ - filename = os.path.join(tmpdir, f'temp{recipe["suffix"]}') + filename = os.path.join(tmpdir, f"temp{recipe['suffix']}") # Create a filesystem from test fixture. fs = fsspec.filesystem("file") diff --git a/fsspec/registry.py b/fsspec/registry.py index 02094ea0a..5d104f266 100644 --- a/fsspec/registry.py +++ b/fsspec/registry.py @@ -218,9 +218,9 @@ def register_implementation(name, cls, clobber=False, errtxt=None): "zip": {"class": "fsspec.implementations.zip.ZipFileSystem"}, } -assert list(known_implementations) == sorted( - known_implementations -), "Not in alphabetical order" +assert list(known_implementations) == sorted(known_implementations), ( + "Not in alphabetical order" +) def get_filesystem_class(protocol): diff --git a/pyproject.toml b/pyproject.toml index 7ec3c85e9..d4d9f49f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -215,8 +215,6 @@ ignore = [ "UP011", "UP015", "UP018", - # deprecated - "UP027", "SIM102", "SIM105", "SIM108", @@ -238,8 +236,6 @@ ignore = [ "Q003", "COM812", "COM819", - "ISC001", - "ISC002", ] [tool.pytest.ini_options]