gh-624 : Added index parameter to to_dict and added axis argument to Series.add_suffix(), DataFrame.add_suffix(), Series.add_prefix() and DataFrame.add_prefix() by ramvikrams · Pull Request #638 · pandas-dev/pandas-stubs (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add a set of tests for this, i.e., test index=True and index=False with different values of orient . Test the index arguments of add_prefix() and add_suffix() as well.
When index=False is not allowed, then just do an assert_type() test, surrounded by if TYPE_CHECKING_INVALID_USAGE: with a correct # type: ignore[???] # pyright: ignore[reportGeneralTypeIssues] Idea here is to make sure that from a typing perspective, we have tested that we are rejecting False when it is not allowed.