3
3
from collections import OrderedDict , namedtuple
4
4
5
5
import pandas as pd
6
- from interface_meta import quirk_docs , override
6
+ from interface_meta import inherit_docs , override
7
7
8
8
from omniduct .duct import Duct
9
9
from omniduct .utils .decorators import require_connection
@@ -23,7 +23,7 @@ class FileSystemClient(Duct, MagicsProvider):
23
23
DUCT_TYPE = Duct .Type .FILESYSTEM
24
24
DEFAULT_PORT = None
25
25
26
- @quirk_docs ("_init" , mro = True )
26
+ @inherit_docs ("_init" , mro = True )
27
27
def __init__ ( # pylint: disable=super-init-not-called
28
28
self , cwd = None , home = None , read_only = False , global_writes = False , ** kwargs
29
29
):
@@ -53,7 +53,7 @@ def _init(self):
53
53
# Path properties and helpers
54
54
55
55
@property
56
- @quirk_docs ("_path_home" )
56
+ @inherit_docs ("_path_home" )
57
57
@require_connection
58
58
def path_home (self ):
59
59
"""
@@ -96,7 +96,7 @@ def path_cwd(self, path_cwd):
96
96
self ._path_cwd = path_cwd
97
97
98
98
@property
99
- @quirk_docs ("_path_separator" )
99
+ @inherit_docs ("_path_separator" )
100
100
def path_separator (self ):
101
101
"""
102
102
str: The character(s) to use in separating path components. Typically
@@ -248,7 +248,7 @@ def _assert_path_is_writable(self, path):
248
248
249
249
# Filesystem accessors
250
250
251
- @quirk_docs ("_exists" )
251
+ @inherit_docs ("_exists" )
252
252
@require_connection
253
253
def exists (self , path ):
254
254
"""
@@ -267,7 +267,7 @@ def exists(self, path):
267
267
def _exists (self , path ):
268
268
raise NotImplementedError
269
269
270
- @quirk_docs ("_isdir" )
270
+ @inherit_docs ("_isdir" )
271
271
@require_connection
272
272
def isdir (self , path ):
273
273
"""
@@ -286,7 +286,7 @@ def isdir(self, path):
286
286
def _isdir (self , path ):
287
287
raise NotImplementedError
288
288
289
- @quirk_docs ("_isfile" )
289
+ @inherit_docs ("_isfile" )
290
290
@require_connection
291
291
def isfile (self , path ):
292
292
"""
@@ -313,7 +313,7 @@ def _dir(self, path):
313
313
"""
314
314
raise NotImplementedError
315
315
316
- @quirk_docs ("_dir" )
316
+ @inherit_docs ("_dir" )
317
317
@require_connection
318
318
def dir (self , path = None ):
319
319
"""
@@ -386,7 +386,7 @@ def _showdir(self, path):
386
386
)
387
387
return "Directory has no contents."
388
388
389
- @quirk_docs ("_walk" )
389
+ @inherit_docs ("_walk" )
390
390
@require_connection
391
391
def walk (self , path = None ):
392
392
"""
@@ -423,7 +423,7 @@ def _walk(self, path):
423
423
): # Note: using _walk directly here, which may fail if disconnected during walk.
424
424
yield walked
425
425
426
- @quirk_docs ("_find" )
426
+ @inherit_docs ("_find" )
427
427
@require_connection
428
428
def find (self , path_prefix = None , ** attrs ):
429
429
"""
@@ -475,7 +475,7 @@ def is_match(f):
475
475
): # Note: using _find directly here, which may fail if disconnected during find.
476
476
yield match
477
477
478
- @quirk_docs ("_mkdir" )
478
+ @inherit_docs ("_mkdir" )
479
479
@require_connection
480
480
def mkdir (self , path , recursive = True , exist_ok = False ):
481
481
"""
@@ -498,7 +498,7 @@ def mkdir(self, path, recursive=True, exist_ok=False):
498
498
def _mkdir (self , path , recursive , exist_ok ):
499
499
raise NotImplementedError
500
500
501
- @quirk_docs ("_remove" )
501
+ @inherit_docs ("_remove" )
502
502
@require_connection
503
503
def remove (self , path , recursive = False ):
504
504
"""
@@ -527,7 +527,7 @@ def _remove(self, path, recursive):
527
527
528
528
# File handling
529
529
530
- @quirk_docs ("_open" )
530
+ @inherit_docs ("_open" )
531
531
@require_connection
532
532
def open (self , path , mode = "rt" ):
533
533
"""
@@ -553,7 +553,7 @@ def open(self, path, mode="rt"):
553
553
def _open (self , path , mode ):
554
554
return FileSystemFile (self , path , mode )
555
555
556
- @quirk_docs ("_file_read_" )
556
+ @inherit_docs ("_file_read_" )
557
557
@require_connection
558
558
def _file_read (self , path , size = - 1 , offset = 0 , binary = False ):
559
559
"""
@@ -577,7 +577,7 @@ def _file_read(self, path, size=-1, offset=0, binary=False):
577
577
def _file_read_ (self , path , size = - 1 , offset = 0 , binary = False ):
578
578
raise NotImplementedError
579
579
580
- @quirk_docs ("_file_write_" )
580
+ @inherit_docs ("_file_write_" )
581
581
@require_connection
582
582
def _file_write (self , path , s , binary = False ):
583
583
"""
@@ -599,7 +599,7 @@ def _file_write(self, path, s, binary=False):
599
599
def _file_write_ (self , path , s , binary ):
600
600
raise NotImplementedError
601
601
602
- @quirk_docs ("_file_append_" )
602
+ @inherit_docs ("_file_append_" )
603
603
@require_connection
604
604
def _file_append (self , path , s , binary = False ):
605
605
"""
@@ -623,7 +623,7 @@ def _file_append_(self, path, s, binary):
623
623
624
624
# File transfer
625
625
626
- @quirk_docs ("_download" )
626
+ @inherit_docs ("_download" )
627
627
def download (self , source , dest = None , overwrite = False , fs = None ):
628
628
"""
629
629
Download files to another filesystem.
0 commit comments