[ 
https://issues.apache.org/jira/browse/SPARK-58312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SPARK-58312:
-----------------------------------
    Labels: pull-request-available  (was: )

> Remove unnecessary type: ignore comments in pyspark.sql.udf and group
> ---------------------------------------------------------------------
>
>                 Key: SPARK-58312
>                 URL: https://issues.apache.org/jira/browse/SPARK-58312
>             Project: Spark
>          Issue Type: Improvement
>          Components: PySpark
>    Affects Versions: 4.3.0
>            Reporter: Haotian Sun
>            Priority: Minor
>              Labels: pull-request-available
>
> Several # type: ignore comments in python/pyspark/sql/udf.py and 
> python/pyspark/sql/group.py can be removed by fixing the underlying type 
> issues:
>  * In UDFRegistration.register, a UDF is built and wrapped by _create_udf, 
> then immediately unwrapped via the ._unwrapped attribute. Building the 
> UserDefinedFunction directly removes this round-trip and 2 [attr-defined] 
> ignores.
>  * In group.py, the @dfapi/@df_varargs_api decorated methods intentionally 
> have docstring-only bodies and trigger 6 [empty-body] ignores. These are 
> replaced by a single file-level disable-error-code directive, matching the 
> style already used in dataframe.py, column.py, window.py, and table_arg.py.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to