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

Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
This commit is contained in:
reivilibre 2021-12-29 15:12:30 +00:00 committed by GitHub
parent f82d38ed2e
commit 2c7f5e74e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

1
changelog.d/11657.misc Normal file
View File

@ -0,0 +1 @@
Add missing type hints to storage classes.

View File

@ -100,7 +100,6 @@ exclude = (?x)
|tests/server.py |tests/server.py
|tests/server_notices/test_resource_limits_server_notices.py |tests/server_notices/test_resource_limits_server_notices.py
|tests/state/test_v2.py |tests/state/test_v2.py
|tests/storage/test_account_data.py
|tests/storage/test_background_update.py |tests/storage/test_background_update.py
|tests/storage/test_base.py |tests/storage/test_base.py
|tests/storage/test_client_ips.py |tests/storage/test_client_ips.py

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from typing import Iterable, Set from typing import Iterable, Optional, Set
from synapse.api.constants import AccountDataTypes from synapse.api.constants import AccountDataTypes
@ -25,7 +25,7 @@ class IgnoredUsersTestCase(unittest.HomeserverTestCase):
self.user = "@user:test" self.user = "@user:test"
def _update_ignore_list( 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: ) -> None:
"""Update the account data to block the given users.""" """Update the account data to block the given users."""
if ignorer_user_id is None: if ignorer_user_id is None: