From 3fbb6fee33b46cccb015607630843dea049d3243 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 11 Oct 2023 21:18:56 +0200 Subject: [PATCH] =?UTF-8?q?.super(C,=20self)=20=E2=86=92=20.super()=20(#13?= =?UTF-8?q?87)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fsspec/caching.py | 2 +- fsspec/fuse.py | 2 +- fsspec/generic.py | 2 +- fsspec/implementations/ftp.py | 4 ++-- fsspec/implementations/sftp.py | 2 +- fsspec/implementations/smb.py | 2 +- fsspec/tests/test_spec.py | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fsspec/caching.py b/fsspec/caching.py index 42c116cb3..34365acb4 100644 --- a/fsspec/caching.py +++ b/fsspec/caching.py @@ -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 diff --git a/fsspec/fuse.py b/fsspec/fuse.py index 8b04626fa..6ca8c973c 100644 --- a/fsspec/fuse.py +++ b/fsspec/fuse.py @@ -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) diff --git a/fsspec/generic.py b/fsspec/generic.py index 15151f330..85301cc5f 100644 --- a/fsspec/generic.py +++ b/fsspec/generic.py @@ -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 diff --git a/fsspec/implementations/ftp.py b/fsspec/implementations/ftp.py index c8e3cf2d2..1c545da8d 100644 --- a/fsspec/implementations/ftp.py +++ b/fsspec/implementations/ftp.py @@ -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" @@ -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): diff --git a/fsspec/implementations/sftp.py b/fsspec/implementations/sftp.py index 14f171dde..47a14f1a2 100644 --- a/fsspec/implementations/sftp.py +++ b/fsspec/implementations/sftp.py @@ -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 diff --git a/fsspec/implementations/smb.py b/fsspec/implementations/smb.py index 5804a6bf5..7f7ffabfe 100644 --- a/fsspec/implementations/smb.py +++ b/fsspec/implementations/smb.py @@ -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 diff --git a/fsspec/tests/test_spec.py b/fsspec/tests/test_spec.py index f76bbef76..4e1a762c8 100644 --- a/fsspec/tests/test_spec.py +++ b/fsspec/tests/test_spec.py @@ -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)) @@ -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: