-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TYP: misc return type annotations #47558
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
Conversation
pandas/_testing/asserters.py
Outdated
@@ -455,7 +455,7 @@ def repr_class(x): | |||
raise_assert_detail(obj, msg, repr_class(left), repr_class(right)) | |||
|
|||
|
|||
def assert_attr_equal(attr: str, left, right, obj: str = "Attributes"): | |||
def assert_attr_equal(attr: str, left, right, obj: str = "Attributes") -> bool: |
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.
We had an issue about this previously (can't find it immediately), but all these assert_*
functions should -> None
. Since this function isn't publicly documented, happy to just have this refactored to not return bools
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.
test_assert_attr_equal_different_nulls
uses assert tm.assert_attr_equal("na_value", obj, obj2)
but I think this is the only function using the return value
Looks like the rebase with main is a little off |
I fixed it and forced pushed |
thanks @twoertwein |
After this most of the low hanging return annotations that
pyright --createstub pandas
finds are in pandas/core (there are still plenty of more tricky return annotations).xref #47521