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

Remove asserts from code. #5452

Merged
merged 1 commit into from Mar 20, 2019
Merged

Conversation

@dojutsu-user
Copy link
Member

@dojutsu-user dojutsu-user commented Mar 13, 2019

Closes #5433

Following grep command was used to find the assert statements

grep -irn "assert" readthedocs.org/ --exclude-dir={user_builds,.tox,htmlcov,media,logs,static,rtd_tests,tests,docs,locale,templates} --exclude="*.pyc" --exclude="tests.py"
Copy link
Member

@ericholscher ericholscher left a comment

Looks good -- thanks!

@ericholscher ericholscher merged commit 80b939f into readthedocs:master Mar 20, 2019
1 check passed
@dojutsu-user dojutsu-user deleted the remove-asserts branch Mar 20, 2019

class InvalidParamsException(Exception):

"""Error raised when incorrect parameters are passed to a function/class."""
Copy link
Member

@stsewd stsewd Mar 20, 2019

We can use ValueError and TypeError in most of the cases of this custom Exception I think, feel free to create another PR with this changes

https://docs.python.org/3/library/exceptions.html#ValueError
https://docs.python.org/3/library/exceptions.html#TypeError

Copy link
Member Author

@dojutsu-user dojutsu-user Mar 20, 2019

@stsewd
Thanks for this.
I'll be opening another PR about this soon.

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

Successfully merging this pull request may close these issues.

None yet

3 participants