@@ -25,7 +25,7 @@ pub struct ArrowFileSystemHandler {
25
25
#[ pymethods]
26
26
impl ArrowFileSystemHandler {
27
27
#[ new]
28
- #[ args ( options = " None" ) ]
28
+ #[ pyo3 ( signature = ( root , options = None ) ) ]
29
29
fn new ( root : String , options : Option < HashMap < String , String > > ) -> PyResult < Self > {
30
30
let inner = ObjectStoreBuilder :: new ( root. clone ( ) )
31
31
. with_path_as_prefix ( true )
@@ -137,7 +137,7 @@ impl ArrowFileSystemHandler {
137
137
Ok ( infos)
138
138
}
139
139
140
- #[ args ( allow_not_found = " false" , recursive = " false" ) ]
140
+ #[ pyo3 ( signature = ( base_dir , allow_not_found = false , recursive = false ) ) ]
141
141
fn get_file_info_selector < ' py > (
142
142
& self ,
143
143
base_dir : String ,
@@ -230,7 +230,7 @@ impl ArrowFileSystemHandler {
230
230
Ok ( file)
231
231
}
232
232
233
- #[ args ( metadata = " None" ) ]
233
+ #[ pyo3 ( signature = ( path , metadata = None ) ) ]
234
234
fn open_output_stream (
235
235
& self ,
236
236
path : String ,
@@ -352,7 +352,7 @@ impl ObjectInputFile {
352
352
Ok ( self . content_length )
353
353
}
354
354
355
- #[ args ( whence = "0" ) ]
355
+ #[ pyo3 ( signature = ( offset , whence = 0 ) ) ]
356
356
fn seek ( & mut self , offset : i64 , whence : i64 ) -> PyResult < i64 > {
357
357
self . check_closed ( ) ?;
358
358
self . check_position ( offset, "seek" ) ?;
@@ -378,7 +378,7 @@ impl ObjectInputFile {
378
378
Ok ( self . pos )
379
379
}
380
380
381
- #[ args ( nbytes = " None" ) ]
381
+ #[ pyo3 ( signature = ( nbytes = None ) ) ]
382
382
fn read ( & mut self , nbytes : Option < i64 > ) -> PyResult < Py < PyBytes > > {
383
383
self . check_closed ( ) ?;
384
384
let range = match nbytes {
@@ -512,13 +512,11 @@ impl ObjectOutputStream {
512
512
Err ( PyNotImplementedError :: new_err ( "'size' not implemented" ) )
513
513
}
514
514
515
- #[ args( whence = "0" ) ]
516
515
fn seek ( & mut self , _offset : i64 , _whence : i64 ) -> PyResult < i64 > {
517
516
self . check_closed ( ) ?;
518
517
Err ( PyNotImplementedError :: new_err ( "'seek' not implemented" ) )
519
518
}
520
519
521
- #[ args( nbytes = "None" ) ]
522
520
fn read ( & mut self , _nbytes : Option < i64 > ) -> PyResult < ( ) > {
523
521
self . check_closed ( ) ?;
524
522
Err ( PyNotImplementedError :: new_err ( "'read' not implemented" ) )
0 commit comments