Re-enable Codechef is_invalid_handle_check
raj454raj opened this issue · 5 comments
Use
to replaceHey! Can I take up this issue?
Hey @punndcoder28 ! You can surely take this up, let me know if you have any issues and feel free to raise a PR
Hey. If my understanding of the issue is correct do you want to replace the static method is_invalid_handle(handle
with just _validate_handle(self)
?
Hey @punndcoder28 ,
It's not that straight forward.
To use __validate_handle
we need self.access_token to be set via __get_access_token
method. You will have to think about how to make it independent of self and make it static method.
You can do something like the following -.
@staticmethod
def is_invalid_handle(handle):
...
@staticmethod
def __get_access_token():
...
@staticmethod
def __validate_handle(handle, access_token):
...
You can also test this without needing the Codechef api tokens, just return some dummy values and make sure with print statements are printed from web2py shell python web2py -S stopstalk -M
Hey @raj454raj . I've opened a PR #383. Can you check if this is right.
Let me know if any mistakes are present or any changes are required.