Skip to content
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

Check signature of returned types instead of class #182

Open
lisad opened this issue Dec 10, 2024 · 0 comments
Open

Check signature of returned types instead of class #182

lisad opened this issue Dec 10, 2024 · 0 comments

Comments

@lisad
Copy link
Owner

lisad commented Dec 10, 2024

We have some code to help make sure the developer doesn't do something easy, dumb and hard to debug -- to forget to return a value from a step entirely. If we don't check this specifically the errors we get from assuming the step did return a dict (or a DataFrame) are much more random and slower to track down.

    if not "DataFrame" in str(result.__class__):

However, we shouldn't be checking to see if the class name has a string in it - we can instead see if the return value has a "to_dict" method. That could be even more useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant