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

Remove asserts from code. #5452

merged 1 commit into from
Mar 20, 2019

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good -- thanks!

@ericholscher ericholscher merged commit 80b939f into readthedocs:master Mar 20, 2019
@dojutsu-user dojutsu-user deleted the remove-asserts branch March 20, 2019 15:44

class InvalidParamsException(Exception):

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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
Development

Successfully merging this pull request may close these issues.

3 participants