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

Re-enable Codechef is_invalid_handle_check #381

Open
raj454raj opened this issue Oct 2, 2019 · 5 comments
Open

Re-enable Codechef is_invalid_handle_check #381

raj454raj opened this issue Oct 2, 2019 · 5 comments

Comments

@raj454raj
Copy link
Member

Use

def __validate_handle(self):
to replace

@punndcoder28
Copy link

Hey! Can I take up this issue?

@raj454raj
Copy link
Member Author

Hey @punndcoder28 ! You can surely take this up, let me know if you have any issues and feel free to raise a PR

@punndcoder28
Copy link

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)?

@raj454raj
Copy link
Member Author

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

@punndcoder28
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants