Skip to content

Commit

Permalink
remove extraneous dollar sign in py format string (#3878)
Browse files Browse the repository at this point in the history
* remove extraneous dollar sign in py format string

* Add changelog entry

---------

Co-authored-by: Maxime Mangel <mangel.maxime@protonmail.com>
  • Loading branch information
joprice and MangelMaxime authored Sep 15, 2024
1 parent d784e86 commit 9cf4849
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/Fable.Cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Changed

* [Python] Remove `$` sign when reporting an error from `assert_equal` and `assert_not_equal` (#3878) (by @joprice)

## 4.20.0 - 2024-09-04

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/fable-library-py/fable_library/reflection.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def get_enum_case(t: TypeInfo, v: int | str) -> EnumCase:
if kv[0] == v:
return kv

raise ValueError(f"{v}' was not found in ${t.fullname}")
raise ValueError(f"{v}' was not found in {t.fullname}")

for kv in t.enum_cases:
if kv[1] == v:
Expand Down
4 changes: 2 additions & 2 deletions src/fable-library-py/fable_library/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,12 @@ def clamp(comparer: Callable[[_T, _T], int], value: _T, min: _T, max: _T):

def assert_equal(actual: Any, expected: Any, msg: str | None = None) -> None:
if not equals(actual, expected):
raise Exception(msg or f"Expected: ${expected} - Actual: ${actual}")
raise Exception(msg or f"Expected: {expected} - Actual: {actual}")


def assert_not_equal(actual: _T, expected: _T, msg: str | None = None) -> None:
if equals(actual, expected):
raise Exception(msg or f"Expected: ${expected} - Actual: ${actual}")
raise Exception(msg or f"Expected: {expected} - Actual: {actual}")


MAX_LOCKS = 1024
Expand Down

0 comments on commit 9cf4849

Please sign in to comment.