Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 92dba74

Browse files
author
David Robertson
committed
Remove additional unused ignores
1 parent 38f23ef commit 92dba74

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

scripts-dev/check_pydantic_models.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,9 @@ def make_wrapper(factory: Callable[P, R]) -> Callable[P, R]:
8888

8989
@functools.wraps(factory)
9090
def wrapper(*args: P.args, **kwargs: P.kwargs) -> R:
91-
# type-ignore: should be redundant once we can use https://github.com/python/mypy/pull/12668
92-
if "strict" not in kwargs: # type: ignore[attr-defined]
91+
if "strict" not in kwargs:
9392
raise MissingStrictInConstrainedTypeException(factory.__name__)
94-
if not kwargs["strict"]: # type: ignore[index]
93+
if not kwargs["strict"]:
9594
raise MissingStrictInConstrainedTypeException(factory.__name__)
9695
return factory(*args, **kwargs)
9796

synapse/storage/databases/main/search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ async def search_rooms(
641641
raise Exception("Unrecognized database engine")
642642

643643
# mypy expects to append only a `str`, not an `int`
644-
args.append(limit) # type: ignore[arg-type]
644+
args.append(limit)
645645

646646
results = await self.db_pool.execute(
647647
"search_rooms", self.db_pool.cursor_to_dict, sql, *args

0 commit comments

Comments
 (0)