Skip to content

Commit 75f18a5

Browse files
fjetterwesm
authored andcommitted
Remove isinstance check in _ensure_filesystem
1 parent 302b644 commit 75f18a5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

python/pyarrow/parquet.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -646,11 +646,9 @@ def open_file(path, meta=None):
646646

647647

648648
def _ensure_filesystem(fs):
649-
if not isinstance(fs, type):
650-
fs_type = type(fs)
651-
else:
652-
fs_type = fs
649+
fs_type = type(fs)
653650

651+
# If the arrow filesystem was subclassed, assume it supports the full interface and return it
654652
if not issubclass(fs_type, FileSystem):
655653
for mro in inspect.getmro(fs_type):
656654
if mro.__name__ is 'S3FileSystem':

0 commit comments

Comments
 (0)