-
Notifications
You must be signed in to change notification settings - Fork 829
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1099 from gboeing/typing
add simple mypy checks and simplify/test custom errors
- Loading branch information
Showing
9 changed files
with
36 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,17 @@ | ||
"""Define custom errors and exceptions.""" | ||
|
||
|
||
class ResponseStatusCodeError(ValueError): # pragma: no cover | ||
class ResponseStatusCodeError(ValueError): | ||
"""Exception for an unhandled server response status code.""" | ||
|
||
def __init__(self, *args, **kwargs): | ||
"""Create exception.""" | ||
Exception.__init__(self, *args, **kwargs) | ||
|
||
|
||
class CacheOnlyInterruptError(InterruptedError): # pragma: no cover | ||
class CacheOnlyInterruptError(InterruptedError): | ||
"""Exception for settings.cache_only_mode=True interruption.""" | ||
|
||
def __init__(self, *args, **kwargs): | ||
"""Create exception.""" | ||
Exception.__init__(self, *args, **kwargs) | ||
|
||
|
||
class InsufficientResponseError(ValueError): # pragma: no cover | ||
class InsufficientResponseError(ValueError): | ||
"""Exception for empty or too few results in server response.""" | ||
|
||
def __init__(self, *args, **kwargs): | ||
"""Create exception.""" | ||
Exception.__init__(self, *args, **kwargs) | ||
|
||
|
||
class GraphSimplificationError(ValueError): # pragma: no cover | ||
class GraphSimplificationError(ValueError): | ||
"""Exception for a problem with graph simplification.""" | ||
|
||
def __init__(self, *args, **kwargs): | ||
"""Create exception.""" | ||
Exception.__init__(self, *args, **kwargs) |
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