Replace some `AssertionError` with other exceptions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 394
- Forks
- 95
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 7
Description
As @jeffquinn-msk observed, assertions are ignored when the code runs in production. We should verify that no assertion is actually required for the logic of the execution, and in case they are required, replace them with other types of exception. Many assertions are used for mypy, but I see some of them are required for a correct execution, so better to look for them and replace them.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the Python codebase for assertions and determine which are required for correct execution rather than used only for mypy. Replace required assertions with other exception types, while leaving type-checking-only assertions as appropriate; done means production execution does not depend on assertion checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100