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

allow beat to dictate when to log None #113

Open
bandophahita opened this issue Oct 17, 2023 · 1 comment
Open

allow beat to dictate when to log None #113

bandophahita opened this issue Oct 17, 2023 · 1 comment
Assignees

Comments

@bandophahita
Copy link
Contributor

beat should have an argument that tells it when to log the return values if they are None.

@bandophahita bandophahita self-assigned this Oct 17, 2023
@bandophahita
Copy link
Contributor Author

To add a little more context;

beat wraps the function which might return something but it's very difficult to know exactly when we should log None was returned.
#105 was added to help with determining, but it depends on the user annotating the function returns anything besides None. (e.g. def foo() -> str | None:)

While the above should suffice in most cases, there could be times where users still wants to log the fact that None returned and either they do not annotate or the annotation specifically designates the return is always None (e.g. def foo() -> None:).

In those rare cases it would be good if they had the ability to tell beat to log None was returned anyway.

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