Vaibhav S Gowda created FLINK-39741:
---------------------------------------
Summary: Add generic type hints to DataStream functions in
functions.py
Key: FLINK-39741
URL: https://issues.apache.org/jira/browse/FLINK-39741
Project: Flink
Issue Type: Improvement
Components: API / Python
Reporter: Vaibhav S Gowda
This improvement adds generic type hints to the core abstract
function classes in pyflink/datastream/functions.py.
Changes include:
- Made MapFunction properly Generic[IN, OUT]
- Made FlatMapFunction properly Generic[IN, OUT]
- Made FilterFunction properly Generic[IN]
- Made KeySelector properly Generic[IN, KEY]
- Added return type annotations to all abstract methods
- Fixed docstring typos
This enables mypy static type checking for users extending
these classes and improves IDE autocompletion quality.
PR: https://github.com/apache/flink/pull/28216
--
This message was sent by Atlassian Jira
(v8.20.10#820010)