HyukjinKwon commented on a change in pull request #34886:
URL: https://github.com/apache/spark/pull/34886#discussion_r768231711



##########
File path: python/pyspark/sql/pandas/typehints.py
##########
@@ -138,9 +138,8 @@ def infer_eval_type(
 def check_tuple_annotation(
     annotation: Any, parameter_check_func: Optional[Callable[[Any], bool]] = 
None
 ) -> bool:
-    # Python 3.6 has `__name__`. Python 3.7 and 3.8 have `_name`.

Review comment:
       Ah, we can just fix the comments here like: `Tuple` has `_name` but 
other types have `__name__`, and recoverthe codes `, getattr(annotation, 
"__name__", None)`.
   
   Here can take other instances than `Tuple` that have `__name__` attributes. 
I should have explained that in the comment here ..
   




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



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

Reply via email to