You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f4e063b
Browse filesBrowse the repository at this point in the historyBrowse files
Make match statements pass mypy's exhaustive-match check (frequenz-floss#1455)
frequenz-floss#1448 updates `frequenz-repo-config` to 0.19.0, which enables mypy's
`exhaustive-match` error code, and CI fails on 11 `match` statements
that mypy can't prove to be exhaustive. These are the code changes
needed to make it pass.
Most of the reported statements match over a tuple, and mypy can't prove
*any* of those exhaustive: it narrows tuple items inside a matching
case, but can't subtract combinations across cases (python/mypy#12364),
so writing the missing case does not help. Those either stop matching
over a tuple, or get an explicit last case. The rest were genuinely
missing cases, which are now spelled out.
One bug came out of it, in `COALESCE()`, and it has its own commit and
release notes entry. Everything else is behaviour preserving, except
that the formula operators now raise instead of silently evaluating to
nothing when an operand has an unexpected type, which can only happen if
something violates the type hints at runtime.
Copy file name to clipboardExpand all lines: RELEASE_NOTES.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,4 +16,4 @@
16
16
17
17
## Bug Fixes
18
18
19
-
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
19
+
*`COALESCE()` no longer unsubscribes from the parameter that is producing values when the parameter it was tracking evaluates to nothing at all. This could only happen when a parameter is an expression that has no value yet, like a nested function call, in which case the samples of the producing parameter were counted against the tracked one.
0 commit comments