Verify type hints for Bot method & class parameters#3868
Conversation
|
suggestions for optimizations / a different approach welcome btw |
few other minor changes
Breaking change: PassportFile.file_date now returns a datetime instead of integer
2b8397b to
02b5060
Compare
Bibo-Joshi
left a comment
There was a problem hiding this comment.
Pfew, that is quite some code 🤯 I went through it once and left a bunch of comments, but I probably didn't get everything :D
I feel like as a follow-up of this PR, a refactoring of test_official into multiple modules is in order. I'll create an issue for that.
Also rearrange 2 tests
Also don't collect test_official on py < 3.10
Bibo-Joshi
left a comment
There was a problem hiding this comment.
Thanks for the new updates :) I don't think I have any more comments left - great job with Harshil, I continue to be amazed by your patience with test optimization 👏
Does anyone else want to review?
Poolitzer
left a comment
There was a problem hiding this comment.
I didnt catch an error, great job with the official extension!
lemontree210
left a comment
There was a problem hiding this comment.
I am NOT picking on function docstrings containing a third-person verb instead of imperative 😆
Very impressive indeed. I think that there could be some intersections in functionality with our admonition inserting tools, but that's just a thought.
also remove print statements
|
Deepsource failure is unrelated. Merging once other tests pass |
|
Awesome addition! thanks a lot :) |
Expands
test_officialby verifying that the type hints in our lib is same as TG API's.Also changes type hint of
user_idin bot methods fromint | strto justintas specified by the API.The change is breaking becauseNo longer breaking.PassportFile.file_datenow accepts a datetime only, and itsde_jsonnow converts int -> datetime.Tests pass locally, seem to be failing here mysteriously
After review, before merge: