Skip to content

Commit

Permalink
Tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
eachanjohnson committed Oct 5, 2024
1 parent af54240 commit 4588a83
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions carabiner/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,10 @@ def _(x: TextIOWrapper):
def _cast_base(object: Any,
to: str,
*args, **kwargs):

try:

casting_function = CASTING_FUNCTIONS[to]

except KeyError:

raise TypeError(f"Cannot cast {type(object).__name__} to {to}.")

return casting_function(object,
*args, **kwargs)

Expand Down

0 comments on commit 4588a83

Please sign in to comment.