Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.super(C, self).super() #1387

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fsspec/caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ class KnownPartsOfAFile(BaseCache):
name = "parts"

def __init__(self, blocksize, fetcher, size, data={}, strict=True, **_):
super(KnownPartsOfAFile, self).__init__(blocksize, fetcher, size)
super().__init__(blocksize, fetcher, size)
self.strict = strict

# simple consolidation of contiguous blocks
Expand Down
2 changes: 1 addition & 1 deletion fsspec/fuse.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def main(args):

class RawDescriptionArgumentParser(argparse.ArgumentParser):
def format_help(self):
usage = super(RawDescriptionArgumentParser, self).format_help()
usage = super().format_help()
parts = usage.split("\n\n")
parts[1] = self.description.rstrip()
return "\n\n".join(parts)
Expand Down
2 changes: 1 addition & 1 deletion fsspec/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def __init__(self, default_method="default", **kwargs):
- "current": takes the most recently instantiated version of each FS
"""
self.method = default_method
super(GenericFileSystem, self).__init__(**kwargs)
super().__init__(**kwargs)

def _strip_protocol(self, path):
# normalization only
Expand Down
4 changes: 2 additions & 2 deletions fsspec/implementations/ftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(
encoding: str
Encoding to use for directories and filenames in FTP connection
"""
super(FTPFileSystem, self).__init__(**kwargs)
super().__init__(**kwargs)
self.host = host
self.port = port
self.tempdir = tempdir or "/tmp"
Expand Down Expand Up @@ -252,7 +252,7 @@ def invalidate_cache(self, path=None):
self.dircache.clear()
else:
self.dircache.pop(path, None)
super(FTPFileSystem, self).invalidate_cache(path)
super().invalidate_cache(path)


class TransferDone(Exception):
Expand Down
2 changes: 1 addition & 1 deletion fsspec/implementations/sftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, host, **ssh_kwargs):
"""
if self._cached:
return
super(SFTPFileSystem, self).__init__(**ssh_kwargs)
super().__init__(**ssh_kwargs)
self.temppath = ssh_kwargs.pop("temppath", "/tmp") # remote temp directory
self.host = host
self.ssh_kwargs = ssh_kwargs
Expand Down
2 changes: 1 addition & 1 deletion fsspec/implementations/smb.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def __init__(
- 'w': Allow other handles to be opened with write access.
- 'd': Allow other handles to be opened with delete access.
"""
super(SMBFileSystem, self).__init__(**kwargs)
super().__init__(**kwargs)
self.host = host
self.port = port
self.username = username
Expand Down
4 changes: 2 additions & 2 deletions fsspec/tests/test_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ def _open(self, path, mode="rb", **kwargs):
class BasicCallback(fsspec.Callback):
def __init__(self, **kwargs):
self.events = []
super(BasicCallback, self).__init__(**kwargs)
super().__init__(**kwargs)

def set_size(self, size):
self.events.append(("set_size", size))
Expand Down Expand Up @@ -1009,7 +1009,7 @@ def test_dummy_callbacks_files(tmpdir):

class BranchableCallback(BasicCallback):
def __init__(self, source, dest=None, events=None, **kwargs):
super(BranchableCallback, self).__init__(**kwargs)
super().__init__(**kwargs)
if dest:
self.key = source, dest
else:
Expand Down