[Typing][B-93] Add type annotations for python/paddle/reader/decorator.py
#66305
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Category
User Experience
PR Types
Improvements
Description
为
python/paddle/reader/decorator.py
标注类型,不过对于一些 map、compose 这种用法,现在 Python 类型提示还没有一个比较好的解决方案,就连map
的实现都只是一系列特例+fallback 实现的python/typing#1383 中描述的
Map
貌似可以实现我所需要的这种表达,但是目前连 PEP 都没呢……Related links
PCard-66972