Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: the
other
argument to RelatationDataContent.update(...)
shou…
…ld be optional (#1226) Fixes the signature for `RelationDataContent.update` to match `MutableMapping`, where `other` is optional (a regression introduced in #1883). The type for `other` has been simplified to `Any`. It should really be `Mapping|_SupportsKeysAndGetItem[str,str]` plus a minimal type that supports `.values`, but it was already messy pulling in `_SupportsKeysAndGetItem` in #1183, and we're just passing this through to `MutableMapping` so it doesn't seem like the tight typing is providing enough benefit to justify the complexity of the signature. [typeshed has three overloads](https://github.com/python/typeshed/blob/f7c03486ee01c8ea74823db75e017341bf3c2ad0/stdlib/typing.pyi#L726), so we could match that (as we did in #1883, just incompletely), if that is desirable. Fixes: #1225 --------- Co-authored-by: Tony Meyer <tony.meyer@canonical.com>
- Loading branch information