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

Cleanup in module xcube.core.varexpr #1040

Merged
merged 1 commit into from
Jul 15, 2024
Merged

Conversation

forman
Copy link
Member

@forman forman commented Jul 15, 2024

Cleanup in module xcube.core.varexpr

Checklist:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/source/*
  • Changes documented in CHANGES.md
  • GitHub CI passes
  • AppVeyor CI passes
  • Test coverage remains or increases (target 100%)

@forman forman self-assigned this Jul 15, 2024
@forman forman requested a review from konstntokas July 15, 2024 09:29
@forman forman marked this pull request as ready for review July 15, 2024 10:26
Copy link
Contributor

@konstntokas konstntokas left a comment

Choose a reason for hiding this comment

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

Yes looks cleaner than before. Would you like to update CHANGES.md?

class VarExprValidator(ast.NodeTransformer):
def visit_Lambda(self, node):
raise VarExprError("lambda expressions are not supported")
def _format_callable(name: str, fn: Union[np.ufunc, Callable]):
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reason for putting this outside of the class?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is was a private static method and now it is a private function, calling is shorter as it does not require context object.

@forman
Copy link
Member Author

forman commented Jul 15, 2024

Would you like to update CHANGES.md?

No, this code and the former has not been released yet.

@forman forman merged commit 1481ea3 into main Jul 15, 2024
4 checks passed
@forman forman deleted the forman-varexpr_refactorings branch July 16, 2024 13:20
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