mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-13 10:02:11 -04:00
Use StrCollection in place of Collection[str] in (most) handlers code. (#14922)
Due to the increased safety of StrCollection over Collection[str] and Sequence[str].
This commit is contained in:
parent
dc901a885f
commit
ba79fb4a61
13 changed files with 43 additions and 58 deletions
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from typing import TYPE_CHECKING, List, Sequence, Tuple, Union
|
||||
from typing import TYPE_CHECKING, List, Tuple, Union
|
||||
|
||||
from synapse.api.errors import (
|
||||
NotFoundError,
|
||||
|
@ -169,7 +169,7 @@ class PushRuleRestServlet(RestServlet):
|
|||
raise UnrecognizedRequestError()
|
||||
|
||||
|
||||
def _rule_spec_from_path(path: Sequence[str]) -> RuleSpec:
|
||||
def _rule_spec_from_path(path: List[str]) -> RuleSpec:
|
||||
"""Turn a sequence of path components into a rule spec
|
||||
|
||||
Args:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue