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

Fix a type annotation in test_account_data.py and remove it from the Mypy exclusion list. #11657

Merged
merged 3 commits into from
Dec 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/11657.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add missing type hints to storage classes.
1 change: 0 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ exclude = (?x)
|tests/server.py
|tests/server_notices/test_resource_limits_server_notices.py
|tests/state/test_v2.py
|tests/storage/test_account_data.py
|tests/storage/test_background_update.py
|tests/storage/test_base.py
|tests/storage/test_client_ips.py
Expand Down
4 changes: 2 additions & 2 deletions tests/storage/test_account_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from typing import Iterable, Set
from typing import Iterable, Optional, Set

from synapse.api.constants import AccountDataTypes

Expand All @@ -25,7 +25,7 @@ def prepare(self, hs, reactor, clock):
self.user = "@user:test"

def _update_ignore_list(
self, *ignored_user_ids: Iterable[str], ignorer_user_id: str = None
self, *ignored_user_ids: Iterable[str], ignorer_user_id: Optional[str] = None
) -> None:
"""Update the account data to block the given users."""
if ignorer_user_id is None:
Expand Down