-
Notifications
You must be signed in to change notification settings - Fork 26.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace assert statements with exceptions (#24856)
* Changed AssertionError to ValueError try-except block was using AssesrtionError in except statement while the expected error is value error. Fixed the same. * Changed AssertionError to ValueError try-except block was using AssesrtionError in except statement while the expected error is ValueError. Fixed the same. Note: While raising the ValueError args are passed to it, but later added again while handling the error (See the code snippet) * Changed AssertionError to ValueError try-except block was using AssesrtionError in except statement while the expected error is ValueError. Fixed the same. Note: While raising the ValueError args are passed to it, but later added again while handling the error (See the code snippet) * Changed AssertionError to ValueError * Changed AssertionError to ValueError * Changed AssertionError to ValueError * Changed AssertionError to ValueError * Changed AssertionError to ValueError * Changed assert statement to ValueError based * Changed assert statement to ValueError based * Changed assert statement to ValueError based * Changed incorrect error handling from AssertionError to ValueError * Undoed change from AssertionError to ValueError as it is not needed * Reverted back to using AssertionError as it is not necessary to make it into ValueError * Fixed erraneous comparision Changed == to != * Fixed erraneous comparision Changed == to != * formatted the code * Ran make fix-copies
- Loading branch information
1 parent
12b908c
commit d015401
Showing
8 changed files
with
20 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters