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

feat: add AnonymousExprError #1816

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

EdAbati
Copy link
Collaborator

@EdAbati EdAbati commented Jan 16, 2025

What type of PR is this? (check all applicable)

  • πŸ’Ύ Refactor
  • ✨ Feature
  • πŸ› Bug Fix
  • πŸ”§ Optimization
  • πŸ“ Documentation
  • βœ… Test
  • 🐳 Other

Related issues

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

If you have comments or can explain your changes, please do so below

I propose to add a error for the (very) common error message about anonlymous expressions.

Ideally I would like to move this a level up (since we raise it for every backend) but I get all sorts of mypy error if I do that. e.g. mypy thinks root_names could still be None

Comment on lines +394 to +395
msg = ".over"
raise AnonymousExprError.from_expr_name(msg)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ruff would still complain if we don't move the string to a separate variable

@MarcoGorelli
Copy link
Member

awesome, thanks! i think it's fine to now move this up - in theory, I don't see why we should be raising this error at all, i think for now it's fine to just raise the error at the compliant level

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