You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/12/07 15:16:37 UTC

[GitHub] [arrow] pitrou commented on a change in pull request #7732: ARROW-13208: [Python][CI] Create a build for validating python docstrings

pitrou commented on a change in pull request #7732:
URL: https://github.com/apache/arrow/pull/7732#discussion_r764093278



##########
File path: python/pyarrow/compat.pxi
##########
@@ -52,13 +52,31 @@ except ImportError:
 
 
 def tobytes(o):
+    """
+    Return with the byte representation of the string-like input object.

Review comment:
       ```suggestion
       Encode a unicode or bytes string to bytes.
   ```

##########
File path: python/pyarrow/compat.pxi
##########
@@ -52,13 +52,31 @@ except ImportError:
 
 
 def tobytes(o):
+    """
+    Return with the byte representation of the string-like input object.
+
+    Parameters
+    ----------
+    o : bytes-like
+        Input object.
+    """
     if isinstance(o, str):
         return o.encode('utf8')
     else:
         return o
 
 
 def frombytes(o, *, safe=False):
+    """
+    Return with the unicode string representation of a bytes-like object.
+
+    Parameters
+    ----------
+    o : bytes-like
+        Input object.
+    safe : bool, default False
+        Raise on encoding errors.

Review comment:
       ```suggestion
           If true, raise on encoding errors.
   ```

##########
File path: dev/archery/setup.py
##########
@@ -36,6 +36,7 @@
                  'setuptools_scm'],
     'crossbow-upload': ['github3.py', jinja_req, 'ruamel.yaml',
                         'setuptools_scm'],
+    'numpydoc': ['numpydoc==1.1.0']

Review comment:
       Is there a particular reason for pinning to this exact version?

##########
File path: python/pyarrow/compat.pxi
##########
@@ -52,13 +52,31 @@ except ImportError:
 
 
 def tobytes(o):
+    """
+    Return with the byte representation of the string-like input object.
+
+    Parameters
+    ----------
+    o : bytes-like
+        Input object.

Review comment:
       ```suggestion
           Input string.
   ```

##########
File path: python/pyarrow/compat.pxi
##########
@@ -52,13 +52,31 @@ except ImportError:
 
 
 def tobytes(o):
+    """
+    Return with the byte representation of the string-like input object.
+
+    Parameters
+    ----------
+    o : bytes-like
+        Input object.
+    """
     if isinstance(o, str):
         return o.encode('utf8')
     else:
         return o
 
 
 def frombytes(o, *, safe=False):
+    """
+    Return with the unicode string representation of a bytes-like object.

Review comment:
       ```suggestion
       Decode the given bytestring to unicode.
   ```




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org