Commit 98aa39a
Edvard Majakari
prefer more generic Mapping over dict type (#10)
* prefer more generic Mapping over dict type
typically it's better to specify more generic types for input parameters,
and specific types our return values. In this case changing headers
param from dict to Mapping should resolve typing issues when eg.
starlette.requests.headers.Headers instance is passed to
get_principal_from_headers()
* collections.abc.Mapping instead of deprecated typing.Mapping1 parent e364265 commit 98aa39a
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | | - | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | | - | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
0 commit comments