Open raj454raj opened 5 years ago
Hey! 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.
Use https://github.com/stopstalk/stopstalk-deployment/blob/79911cdaf9e8ff0da963d044b286893144b189ec/modules/sites/codechef.py#L204 to replace https://github.com/stopstalk/stopstalk-deployment/blob/79911cdaf9e8ff0da963d044b286893144b189ec/modules/sites/codechef.py#L139