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

Run JuliaFormatter on more files, remove trailing whitespace #2374

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

mhauru
Copy link
Member

@mhauru mhauru commented Oct 24, 2024

The only actual change is the change in .JuliaFormatter.toml. Everything else is a consequence of running autoformatting and auto-whitespace-removal.

This will clean-up the diff in #1887 a lot, since the formatter has already been run there.

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.45%. Comparing base (08331c5) to head (7ddd02e).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2374      +/-   ##
==========================================
+ Coverage   86.39%   86.45%   +0.06%     
==========================================
  Files          22       22              
  Lines        1573     1573              
==========================================
+ Hits         1359     1360       +1     
+ Misses        214      213       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@penelopeysm penelopeysm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I don't entirely feel comfortable with model functions being edited to include return statements (they aren't really functions), but that's probably just me.

@mhauru
Copy link
Member Author

mhauru commented Oct 24, 2024

The two syntaxes, with and without explicit return, are equivalent though, and different from having e.g. return nothing, because generated_quantities (and I think @submodel, which will soon be the same thing: TuringLang/DynamicPPL.jl#696) makes use of the return value.

@mhauru mhauru closed this Oct 24, 2024
@mhauru mhauru reopened this Oct 24, 2024
Copy link
Contributor

github-actions bot commented Oct 24, 2024

Pull Request Test Coverage Report for Build 11497906386

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 86.395%

Totals Coverage Status
Change from base Build 11497545739: 0.0%
Covered Lines: 1359
Relevant Lines: 1573

💛 - Coveralls

@penelopeysm
Copy link
Member

penelopeysm commented Oct 24, 2024

They are equivalent, yeah. I just think that the rationale for inserting return is more applicable to ordinary functions (i.e. be explicit about what you're returning) than it is to models (where the return value isn't always used); but as I said that's just me :)

Copy link
Member

@yebai yebai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mhauru and @penelopeysm!

@yebai yebai merged commit 269081e into master Oct 25, 2024
62 checks passed
@yebai yebai deleted the mhauru/more-formatting branch October 25, 2024 15:47
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

Successfully merging this pull request may close these issues.

3 participants