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

Unnecessary underscores in the documentation #784

Closed
VladimirShitov opened this issue Aug 7, 2024 · 1 comment · Fixed by #788
Closed

Unnecessary underscores in the documentation #784

VladimirShitov opened this issue Aug 7, 2024 · 1 comment · Fixed by #788
Assignees
Labels
bug Something isn't working

Comments

@VladimirShitov
Copy link
Collaborator

Report

It is not uncommon to see elements of code like this in the documentation:

_ = ep.tl.causal_inference(
    adata=adata,
    graph=causal_graph,
    treatment="aline_flg",
    outcome="icu_los_day",
    estimation_method="backdoor.linear_regression",
)

What is the point of having _ = ? This is exactly what happens in Python internally, anyway. If this is done to prevent printing an output returned by the function, a much more elegant way would be to put ; at the end of the line.

I'm pretty sure I asked this question already, but probably not on GitHub. Sorry for not remembering the answer

Version information

The current release of ehrapy at the time of writing is 0.8.0

@VladimirShitov VladimirShitov added the bug Something isn't working label Aug 7, 2024
@Zethson
Copy link
Member

Zethson commented Aug 7, 2024

If this is done to prevent printing an output returned by the function, a much more elegant way would be to put ; at the end of the line.

Yeah, this is totally not elegant.

There is a third option which is to tag the cell with hide-output which is interpreted by most sphinx themes.

Will be fixed!

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants