-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Structure using the value of attr.ib converter, if defined (#139)
* Implement support for attrib converters * Update docs per PR feedback * Update make_dict_structure_fn to take bool variable instead of reading _prefer_attrib_converters of converter argument * Remove _passthru * Add type_ attribute to StructureHandlerNotFoundError * Update changelog * Fix broken tests * Fix linting errors * Increase test coverage
- Loading branch information
1 parent
e772725
commit 9f53896
Showing
10 changed files
with
247 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from typing import Type | ||
|
||
|
||
class StructureHandlerNotFoundError(Exception): | ||
"""Error raised when structuring cannot find a handler for converting inputs into :attr:`type_`.""" | ||
|
||
def __init__(self, message: str, type_: Type) -> None: | ||
super().__init__(message) | ||
self.type_ = type_ |
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
Oops, something went wrong.