-
-
Notifications
You must be signed in to change notification settings - Fork 33
Improve typing #44
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
Improve typing #44
Conversation
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 4 +1
Lines 116 125 +9
=========================================
+ Hits 116 125 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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.
Thanks for the PR! Here's a couple of suggestions.
any way this could be merged? this seems like an amazing upgrade for usability, and the only blocker seems to be impossible to do in the current state of python typing. |
Thanks for ping. If the conflicts are resolved, I'll take another look. |
This PR introduces two changes to the declared type signatures:
cprint("hello", "orange")
will result incolored
andcprint
was relaxed to acceptobject
s and not juststr
ings. This makescprint
more in line withprint
, which accepts arbitrary objects and fixes the example in README which readserror: Argument 1 to "cprint" has incompatible type "int"; expected "str"
when running through mypy.