-
Notifications
You must be signed in to change notification settings - Fork 25.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add typing.overload for convert_ids_tokens #6637
Add typing.overload for convert_ids_tokens #6637
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6637 +/- ##
==========================================
+ Coverage 79.47% 80.28% +0.80%
==========================================
Files 156 156
Lines 28245 28251 +6
==========================================
+ Hits 22448 22681 +233
+ Misses 5797 5570 -227
Continue to review full report at Codecov.
|
LGTM but will let others chime in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, like this a lot!
@LysandreJik What else should I do to merge this PR? |
* add overload for type checker * black
* add overload for type checker * black
This reverts commit 87d3a5c.
The annotation of
convert_ids_tokens
is not sufficient. Whenids
areList[str]
andstr
, the return type are alwaysList[int]
andint
respectively.It can be solved with typing.overload