Commit 91837ea
committed
Fix incorrect type in ClientApp init signature
`scope_requirements` was annotated as `dict` in init for `ClientApp`, but
the base class, `UserApp`, and the `add_scope_requirements` method all
accept a `Mapping` -- allowing for an immutable mapping type.
To confirm the fix, the typing test which currently checks the scope
requirements type of app objects is expanded to cover
- both UserApp and ClientApp
- `add_scope_requirements` and `__init__`
- a `dict` which is a subtype of `Mapping[K, V]` but not of `dict[K, V]`
(for our specific `K, V`) and a `types.MappingProxyType` (an immutable
dict proxy)
fixes #13581 parent c8f27b8 commit 91837ea
File tree
3 files changed
+36
-4
lines changed- changelog.d
- src/globus_sdk/globus_app
- tests/non-pytest/mypy-ignore-tests
3 files changed
+36
-4
lines changedLines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
Lines changed: 29 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
2 | 7 | | |
3 | 8 | | |
4 | 9 | | |
| |||
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
12 | | - | |
13 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
0 commit comments