Skip to content

Commit

Permalink
fs: use itertools.chain.from_iterable instead of funcy.py3.cat
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop authored and shcheklein committed Apr 9, 2023
1 parent af7f6ac commit 0c632bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pydrive2/fs/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import threading
from collections import defaultdict
from contextlib import contextmanager
from itertools import chain

from fsspec.spec import AbstractFileSystem
from funcy import cached_property, retry, wrap_prop, wrap_with
from funcy.py3 import cat
from tqdm.utils import CallbackIOWrapper

from pydrive2.drive import GoogleDrive
Expand Down Expand Up @@ -314,7 +314,7 @@ def _gdrive_list(self, query):
get_list = _gdrive_retry(lambda: next(file_list, None))

# Fetch pages until None is received, lazily flatten the thing.
return cat(iter(get_list, None))
return chain.from_iterable(iter(get_list, None))

def _gdrive_list_ids(self, query_ids):
query = " or ".join(
Expand Down

0 comments on commit 0c632bf

Please sign in to comment.