Commit a9eee99
authored
Allow subclasses of APIView to override get_permissions with return type implementing _SupportsHasPermission (#320)
Issue is that list is invariant, which makes the protocol not work.
Changing it so a sequence of course breaks stuff that relies on the result being mutable, but I am assuming that that should not be supported anyways.1 parent cdd962e commit a9eee99
File tree
2 files changed
+12
-1
lines changed- rest_framework-stubs
- tests/typecheck
2 files changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
0 commit comments