Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-42903

Avoid documenting None as as a return value in docstring

    XMLWordPrintableJSON

Details

    • Documentation
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • PySpark
    • None

    Description

      e.g.):

      +++ 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
      

      to be consistent. In Python, it's idiomatic to don't specify the return for return None.

      Attachments

        Issue Links

          Activity

            People

              gurwls223 Hyukjin Kwon
              gurwls223 Hyukjin Kwon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: