Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion typomancy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "0.0.14"
__version__ = "0.0.15"

from . import handlers
3 changes: 2 additions & 1 deletion typomancy/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def type_wrangler(input_data: str,
try:
cast_data = literal_eval(input_data) # "13" resolves to int, even if it would be fine as a float
except Exception as e:
print(f"Error converting {input_data} to type {typecast}")
raise e
try:
tmp_cast = typecast(cast_data)
Expand All @@ -62,6 +61,8 @@ def type_wrangler(input_data: str,
return cast_data
except ValueError: # be nice and assume that the error is in the type, not the user's input
raise TypeError(f"Unable to convert input of type {type(input_data)} to {typecast}")
except Exception as e:
raise e
elif _istyping(typecast):
# Try to do casting
caster = cast_map[typecast.__name__]
Expand Down