You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2023/03/23 06:29:42 UTC

[spark] branch master updated: [SPARK-42903][PYTHON][DOCS] Avoid documenting None as as a return value in docstring

This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 07301b4ab96 [SPARK-42903][PYTHON][DOCS] Avoid documenting None as as a return value in docstring
07301b4ab96 is described below

commit 07301b4ab96365cfee1c6b7725026ef3f68e7ca1
Author: Hyukjin Kwon <gu...@apache.org>
AuthorDate: Thu Mar 23 15:29:29 2023 +0900

    [SPARK-42903][PYTHON][DOCS] Avoid documenting None as as a return value in docstring
    
    ### What changes were proposed in this pull request?
    
    This PR proposes to remove None as as a return value in docstring.
    
    ### Why are the changes needed?
    
    To be consistent with the current documentation. Also, it's idiomatic to don't specify the return for `return None`.
    
    ### Does this PR introduce _any_ user-facing change?
    
    Yes, it changes the user-facing documentation.
    
    ### How was this patch tested?
    
    Doc build in the CI should verify them.
    
    Closes #40530 from HyukjinKwon/SPARK-42903.
    
    Authored-by: Hyukjin Kwon <gu...@apache.org>
    Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
 python/pyspark/sql/dataframe.py | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/python/pyspark/sql/dataframe.py b/python/pyspark/sql/dataframe.py
index b5e6e49fb05..4bc32c41a09 100644
--- a/python/pyspark/sql/dataframe.py
+++ b/python/pyspark/sql/dataframe.py
@@ -385,10 +385,6 @@ class DataFrame(PandasMapOpsMixin, PandasConversionMixin):
         name : str
             Name of the view.
 
-        Returns
-        -------
-        None
-
         Examples
         --------
         Create a local temporary view named 'people'.
@@ -426,10 +422,6 @@ class DataFrame(PandasMapOpsMixin, PandasConversionMixin):
         name : str
             Name of the view.
 
-        Returns
-        -------
-        None
-
         Examples
         --------
         Create a global temporary view.
@@ -467,10 +459,6 @@ class DataFrame(PandasMapOpsMixin, PandasConversionMixin):
         name : str
             Name of the view.
 
-        Returns
-        -------
-        None
-
         Examples
         --------
         Create a global temporary view.
@@ -592,10 +580,6 @@ class DataFrame(PandasMapOpsMixin, PandasConversionMixin):
         .. versionchanged:: 3.4.0
             Supports Spark Connect.
 
-        Returns
-        -------
-        None
-
         Examples
         --------
         >>> df = spark.createDataFrame(
@@ -857,10 +841,6 @@ class DataFrame(PandasMapOpsMixin, PandasConversionMixin):
             If set to ``True``, print output rows vertically (one line
             per column value).
 
-        Returns
-        -------
-        None
-
         Examples
         --------
         >>> df = spark.createDataFrame([


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org