Closed CSenshi closed 4 years ago
Hello! I am interested to contribute. @nikalosa, have you started working on this problem?
Hi @mateuszz0000 , feel free to work on this issue. We appreciate your interest in our project.
@mateuszz0000 If you are willing to contribute I'll assign this issue to you .
I'll try make it more specific
We need to change all Rules (in the directory 'rules_src') so that naming __call__
is changed to check
We need to change all of rule's doctests for example now we have something like this:
>>> TrueBetween = Between(2, 15)
>>> TrueBetween(23)
False
we need to change it to:
>>> Between(2, 15).check(23)
False
We have parent class of all rules called Rule (located at validator/rules_src/__init__.py
). we need to encapsulate new method check into __call___
So now we have:
def __call__(self, arg):
return False
we need to have:
def __call__(self, arg):
return self.check(arg)
Good luck and don't hesitate on questions! :100:
Would be great! Thanks :)
As for now we have Rules as callable classes. It doesn't seem user friendly, so lets change it to use check() method, see example below for between rule:
Now:
Between(18, 30)(25)
After:Between(18, 30).check(25)