dchvn commented on a change in pull request #34323: URL: https://github.com/apache/spark/pull/34323#discussion_r734229556
########## File path: python/pyspark/streaming/kinesis.py ########## @@ -34,11 +38,22 @@ def utf8_decoder(s): class KinesisUtils(object): @staticmethod - def createStream(ssc, kinesisAppName, streamName, endpointUrl, regionName, - initialPositionInStream, checkpointInterval, - storageLevel=StorageLevel.MEMORY_AND_DISK_2, - awsAccessKeyId=None, awsSecretKey=None, decoder=utf8_decoder, - stsAssumeRoleArn=None, stsSessionName=None, stsExternalId=None): + def createStream( + ssc: StreamingContext, + kinesisAppName: str, + streamName: str, + endpointUrl: str, + regionName: str, + initialPositionInStream: str, + checkpointInterval: int, + storageLevel: StorageLevel = StorageLevel.MEMORY_AND_DISK_2, + awsAccessKeyId: Optional[str] = None, + awsSecretKey: Optional[str] = None, + decoder: Callable[[Optional[bytes]], T] = utf8_decoder, # type: ignore[assignment] Review comment: Oh, because we have ```utf8_decoder: Callable[[Optional[bytes]], Optional[str]]``` but ```decoder``` is ```Callable[[Optional[bytes]], T]```. Do you have any suggestion? I am facing with many errors like that in ```python/pyspark/rdd.py```. Thanks! -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org