You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
t ="""# https://github.com/SciML/SciMLStyle#comments# In general, comments above a line of code or function are preferred to inline comments.f(; q) = qf( q = 2 # this comment will be removed)"""format_text(t, style=SciMLStyle()) |> Text
Returns
# https://github.com/SciML/SciMLStyle#comments# In general, comments above a line of code or function are preferred to inline comments.f(; q) = q
f(q =2)
As noted the style guide favors commands above, but I assume the formatter is not supposed to remove them? #513 and #562 seem similar, but not the same.
For the example of #513 only the last comment gets removed:
f(10# i got removed!*10# me too!+10)
The text was updated successfully, but these errors were encountered:
interesting corner case since SciMLStyle uses YASStyle for a lot of defaults and YASStyle doesn't allow opening/closing parenthesis to be on their own line.
The simplest fix which should still adhere to the style is to put the comment after the closing parenthesis
Returns
As noted the style guide favors commands above, but I assume the formatter is not supposed to remove them?
#513 and #562 seem similar, but not the same.
For the example of #513 only the last comment gets removed:
The text was updated successfully, but these errors were encountered: