Skip to content

Commit

Permalink
Add _unused_kwargs to each filesystem (to avoid strict filesystem dep…
Browse files Browse the repository at this point in the history
…endency in open_url arguments)
  • Loading branch information
belltailjp committed Dec 27, 2021
1 parent 044ab84 commit 52d5cf5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion pfio/v2/hdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ class Hdfs(FS):
'''

def __init__(self, cwd=None):
def __init__(self, cwd=None, **_unused_kwargs):
super().__init__()
del _unused_kwargs
self._fs = _create_fs()
assert self._fs is not None
self.username = self._get_principal_name()
Expand Down
4 changes: 3 additions & 1 deletion pfio/v2/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ def __init__(self, _stat, filename):


class Local(FS):
def __init__(self, cwd=None):
def __init__(self, cwd=None, **_unused_kwargs):
super().__init__()
del _unused_kwargs

if cwd is None:
self._cwd = ''
else:
Expand Down
5 changes: 4 additions & 1 deletion pfio/v2/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,11 @@ def __init__(self, bucket, prefix=None,
aws_access_key_id=None,
aws_secret_access_key=None,
mpu_chunksize=32*1024*1024,
buffering=-1):
buffering=-1,
**_unused_kwargs):
super().__init__()
del _unused_kwargs

self.bucket = bucket
if prefix is not None:
self.cwd = prefix
Expand Down
3 changes: 2 additions & 1 deletion pfio/v2/zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ def __init__(self, zip_info):
class Zip(FS):
_readonly = True

def __init__(self, backend, file_path, mode='r', cwd=None):
def __init__(self, backend, file_path, mode='r', **_unused_kwargs):
super().__init__()
del _unused_kwargs
self.backend = backend
self.file_path = file_path
self.mode = mode
Expand Down

0 comments on commit 52d5cf5

Please sign in to comment.