mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 17:55:06 -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
|
@ -13,7 +13,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
import logging
|
||||
from typing import TYPE_CHECKING, Collection, Dict, List, Optional, Set
|
||||
from typing import TYPE_CHECKING, Dict, List, Optional, Set
|
||||
|
||||
import attr
|
||||
|
||||
|
@ -28,7 +28,7 @@ from synapse.logging.opentracing import trace
|
|||
from synapse.metrics.background_process_metrics import run_as_background_process
|
||||
from synapse.rest.admin._base import assert_user_is_admin
|
||||
from synapse.streams.config import PaginationConfig
|
||||
from synapse.types import JsonDict, Requester, StreamKeyType
|
||||
from synapse.types import JsonDict, Requester, StrCollection, StreamKeyType
|
||||
from synapse.types.state import StateFilter
|
||||
from synapse.util.async_helpers import ReadWriteLock
|
||||
from synapse.util.stringutils import random_string
|
||||
|
@ -391,7 +391,7 @@ class PaginationHandler:
|
|||
"""
|
||||
return self._delete_by_id.get(delete_id)
|
||||
|
||||
def get_delete_ids_by_room(self, room_id: str) -> Optional[Collection[str]]:
|
||||
def get_delete_ids_by_room(self, room_id: str) -> Optional[StrCollection]:
|
||||
"""Get all active delete ids by room
|
||||
|
||||
Args:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue