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(general): number of words larger/less than or equal operators #3827

Merged
merged 15 commits into from
Nov 14, 2022

Conversation

kadoshms
Copy link
Contributor

@kadoshms kadoshms commented Nov 8, 2022

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Description

Added support for four new operators:

number_of_words_greater_than
number_of_words_greater_than_or_equal
number_of_words_less_than
number_of_words_less_than_or_equal

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@kadoshms kadoshms closed this Nov 8, 2022
@kadoshms kadoshms reopened this Nov 8, 2022
Copy link
Contributor

@gruebel gruebel left a comment

Choose a reason for hiding this comment

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

nice job, I wanted to ask in the other PR, if you also will implement greater and less flavours 😄 I also fixed linting and typing for you, expect you looked forward on doing it on you own 😉

@kadoshms kadoshms requested a review from gruebel November 10, 2022 13:53
Copy link
Contributor

@gruebel gruebel left a comment

Choose a reason for hiding this comment

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

noice 🍻

@gruebel gruebel merged commit 3a82a07 into master Nov 14, 2022
@gruebel gruebel deleted the number-of-words-length branch November 14, 2022 13:46


class NumberOfWordsGreaterThanOrEqualAttributeSolver(BaseNumberOfWordsAttributeSolver):
operator = Operators.NUMBER_OF_WORDS_GREATER_THAN # noqa: CCE003 # a static attribute
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's the wrong operator 🤔



class NumberOfWordsLessThanOrEqualAttributeSolver(BaseNumberOfWordsAttributeSolver):
operator = Operators.NUMBER_OF_WORDS_GREATER_THAN # noqa: CCE003 # a static attribute
Copy link
Contributor

Choose a reason for hiding this comment

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

also here

ayajbara pushed a commit that referenced this pull request Nov 15, 2022
…3827)

* feat: add support for number_of_words_equals and number_of_words_not_equals attribute solvers

* fix: fixed solver type issue

* fix: using split() instead of split(" ") to handle multiple whitespaces as well

* chore: renamed the attribute solver file names

* feat: introducing for new operators number_of_words_greater/less_then_(or_equal)?

* chore: user a base class for number_of_words operators

* fix mypy and linting

* fix: fixed typo in test names

Co-authored-by: Mor Kadosh <[email protected]>
Co-authored-by: gruebel <[email protected]>
ayajbara pushed a commit that referenced this pull request Nov 15, 2022
…3827)

* feat: add support for number_of_words_equals and number_of_words_not_equals attribute solvers

* fix: fixed solver type issue

* fix: using split() instead of split(" ") to handle multiple whitespaces as well

* chore: renamed the attribute solver file names

* feat: introducing for new operators number_of_words_greater/less_then_(or_equal)?

* chore: user a base class for number_of_words operators

* fix mypy and linting

* fix: fixed typo in test names

Co-authored-by: Mor Kadosh <[email protected]>
Co-authored-by: gruebel <[email protected]>
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.

4 participants