jorisvandenbossche commented on code in PR #13564:
URL: https://github.com/apache/arrow/pull/13564#discussion_r917641870
##########
python/pyarrow/_fs.pyx:
##########
@@ -166,19 +186,39 @@ cdef class FileInfo(_Weakrefable):
Returns
-------
type : FileType
+
+ Examples
+ --------
+ >>> local = getfixture('local_fs')
Review Comment:
> If we could just use the name `local` in all the examples, that would be
much clearer.
I think that should actually be possible, if you insert "local" in the
doctest_namespace.
Of course, while that avoids the confusing `getfixture`, it still uses an
object that is not defined in the docstring itself, making it harder to
understand the docstring on its own (and to run the example yourself).
Trying to think for alternatives: specifically for the `FileInfo` class, it
might also be OK to put all the examples in the main class docstrings, instead
of in each attribute docstring? (we could still include a mention about that in
each attribute docstring). That would also avoid the repeated creation of
`local` + writing a single file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]