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

Add Multi-condition Support for Decorators #1

Open
abeltavares opened this issue May 21, 2024 · 0 comments
Open

Add Multi-condition Support for Decorators #1

abeltavares opened this issue May 21, 2024 · 0 comments
Labels

Comments

@abeltavares
Copy link
Owner

Description

We need to extend the existing pre_condition, post_condition, and invariant decorators to support multiple conditions. This will provide a more flexible and powerful way to enforce rules.

Suggested Implementation

Modify the decorators to accept multiple conditions as a list or tuple and validate all of them. If any condition fails, the decorator should raise an exception.

Acceptance Criteria

  • pre_condition, post_condition, and invariant decorators can accept and handle multiple conditions.
  • Exceptions are raised when any of the conditions fail.
  • Unit tests are written to ensure the multi-condition support works as expected.
@abeltavares abeltavares changed the title Add Type Hints to Core Decorator Functions Add Multi-condition Support for Decorators May 21, 2024
@abeltavares abeltavares added the enhancement New feature or request label May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant