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

Expression: disallow bare functions #531

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

mathause
Copy link
Member

As correctly guessed by @veni-vidi-vici-dormivi in #526 (review) I want to disallow passing bare functions to an expression, e.g. loc=mean(). This function would then be translated to loc=np.mean().

@yquilcaille would like to keep this functionality (#526 (comment)).

I still want to remove it because it's not difficult to fix for the user, but difficult to explain and not obvious what happens. Removing also makes the code easier to understand.

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.80%. Comparing base (71a1570) to head (20f537e).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #531      +/-   ##
==========================================
+ Coverage   61.72%   61.80%   +0.08%     
==========================================
  Files          50       50              
  Lines        3569     3561       -8     
==========================================
- Hits         2203     2201       -2     
+ Misses       1366     1360       -6     
Flag Coverage Δ
unittests 61.80% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Collaborator

@yquilcaille yquilcaille left a comment

Choose a reason for hiding this comment

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

I don't mind not allowing bare functions, there are certainly good reasons for that ^^
Looks good to me!

@mathause
Copy link
Member Author

mathause commented Oct 1, 2024

Thanks! I think with the error message it should be clear to the user how to fix it.

@mathause mathause merged commit ca679c7 into MESMER-group:main Oct 1, 2024
9 checks passed
@mathause mathause deleted the disallow_bare_fcns branch October 1, 2024 07:37
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.

2 participants