File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1- from collections .abc import Sequence
1+ from collections .abc import Collection , Mapping , Sequence
22from re import Pattern
33
44# This is defined here as a do-nothing function because we can't import
@@ -545,5 +545,5 @@ SECURE_SSL_REDIRECT: bool
545545##################
546546# CSP MIDDLEWARE #
547547##################
548- SECURE_CSP : dict [str , Sequence [str ] | str ]
549- SECURE_CSP_REPORT_ONLY : dict [str , Sequence [str ] | str ]
548+ SECURE_CSP : Mapping [str , Collection [str ] | str ]
549+ SECURE_CSP_REPORT_ONLY : Mapping [str , Collection [str ] | str ]
Original file line number Diff line number Diff line change 11import sys
2- from collections .abc import Sequence
2+ from collections .abc import Collection , Mapping
33
44from django .utils .functional import SimpleLazyObject
55
@@ -30,4 +30,4 @@ class LazyNonce(SimpleLazyObject):
3030 def __init__ (self ) -> None : ...
3131 def __bool__ (self ) -> bool : ...
3232
33- def build_policy (config : dict [str , Sequence [str ] | str ], nonce : SimpleLazyObject | str | None = None ) -> str : ...
33+ def build_policy (config : Mapping [str , Collection [str ] | str ], nonce : SimpleLazyObject | str | None = None ) -> str : ...
Original file line number Diff line number Diff line change 1- from collections .abc import Callable , Sequence
1+ from collections .abc import Callable , Collection , Mapping
22from typing import Any , TypeVar
33
44_F = TypeVar ("_F" , bound = Callable [..., Any ])
55
6- def csp_override (config : dict [str , Sequence [str ] | str ]) -> Callable [[_F ], _F ]: ...
7- def csp_report_only_override (config : dict [str , Sequence [str ] | str ]) -> Callable [[_F ], _F ]: ...
6+ def csp_override (config : Mapping [str , Collection [str ] | str ]) -> Callable [[_F ], _F ]: ...
7+ def csp_report_only_override (config : Mapping [str , Collection [str ] | str ]) -> Callable [[_F ], _F ]: ...
You can’t perform that action at this time.
0 commit comments