Skip to content

Commit

Permalink
Apply ruff/flake8-type-checking rules (TCH) (#1718)
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos authored Nov 15, 2024
1 parent 4d1ec47 commit 8be05fc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion fsspec/implementations/tests/test_tar.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import tarfile
import tempfile
from io import BytesIO
from pathlib import Path
from typing import TYPE_CHECKING

import pytest

Expand All @@ -15,6 +15,9 @@
from fsspec.implementations.tar import TarFileSystem
from fsspec.implementations.tests.test_archive import archive_data, temptar

if TYPE_CHECKING:
from pathlib import Path


def test_info():
with temptar(archive_data) as t:
Expand Down
3 changes: 2 additions & 1 deletion fsspec/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import logging
import math
import os
import pathlib
import re
import sys
import tempfile
Expand All @@ -24,6 +23,8 @@
from urllib.parse import urlsplit

if TYPE_CHECKING:
import pathlib

from typing_extensions import TypeGuard

from fsspec.spec import AbstractFileSystem
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ select = [
"SIM",
"SLOT",
"SIM101",
"TCH",
"UP",
]
ignore = [
Expand Down

0 comments on commit 8be05fc

Please sign in to comment.