Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use covariant type for
@retried(on=[...])
(#486)
## Changes This PR fixes `mypy` error in downstream projects: ``` src/databricks/labs/ucx/workspace_access/scim.py:121: error: Argument "on" to "retried" has incompatible type "list[type[DatabricksError]]"; expected "list[type[BaseException]]" [arg-type] src/databricks/labs/ucx/workspace_access/scim.py:121: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance src/databricks/labs/ucx/workspace_access/scim.py:121: note: Consider using "Sequence" instead, which is covariant src/databricks/labs/ucx/workspace_access/generic.py:143: error: Argument "on" to "retried" has incompatible type "list[type[DatabricksError]]"; expected "list[type[BaseException]]" [arg-type] src/databricks/labs/ucx/workspace_access/generic.py:143: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance src/databricks/labs/ucx/workspace_access/generic.py:143: note: Consider using "Sequence" instead, which is covariant ``` ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [x] `make test` run locally - [x] `make fmt` applied - [x] relevant integration tests applied
- Loading branch information