Skip to content

Commit

Permalink
hotfix: re-enable numberentry element to deal with string input
Browse files Browse the repository at this point in the history
  • Loading branch information
jobrachem committed Oct 28, 2021
1 parent d48403f commit e687e93
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ Types of changes
6. Security in case of vulnerabilities.
-->

## alfred3 v2.3.1 (Released 2021-10-28)

### Fixed v2.3.1

- Fixed an issue with string inputs to `NumberEntryElement` that was
introduced in v2.3.0

## alfred3 v2.3.0 (Released 2021-10-28)

### Added v2.3.0
Expand Down
2 changes: 1 addition & 1 deletion src/alfred3/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# 2) we can import it in setup.py for the same reason
# 3) we can import it into your module module

__version__ = "2.3.0"
__version__ = "2.3.1"
5 changes: 4 additions & 1 deletion src/alfred3/element/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,10 @@ def default_match_hint(self) -> str:
@property
def input(self) -> float:
# docstring inherited
return float(self._input) if self._input is not None else None
try:
return float(self._input) if self._input is not None else None
except ValueError:
return self._input

@input.setter
def input(self, value: str):
Expand Down

0 comments on commit e687e93

Please sign in to comment.