dchvn commented on a change in pull request #34433:
URL: https://github.com/apache/spark/pull/34433#discussion_r749831676
##########
File path: python/pyspark/__init__.py
##########
@@ -63,44 +64,56 @@
from pyspark.version import __version__
from pyspark._globals import _NoValue # noqa: F401
+T = TypeVar("T")
+F = TypeVar("F", bound=Callable)
-def since(version):
+
+def since(version: Union[str, float]) -> Callable[[T], T]:
"""
A decorator that annotates a function to append the version of Spark the
function was added.
"""
import re
indent_p = re.compile(r"\n( +)")
- def deco(f):
- indents = indent_p.findall(f.__doc__)
+ def deco(f: T) -> T:
Review comment:
Thank you! updated.
--
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]