diff options
author | reivilibre <oliverw@matrix.org> | 2021-12-29 15:12:30 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-29 15:12:30 +0000 |
commit | 2c7f5e74e5ae5eb7e5d0b99001610a829b0b35da (patch) | |
tree | e9871e8bb88348bdc2a889f6ce42e27baf3b74c8 | |
parent | Improve type hints in storage classes. (#11652) (diff) | |
download | synapse-2c7f5e74e5ae5eb7e5d0b99001610a829b0b35da.tar.xz |
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>
-rw-r--r-- | changelog.d/11657.misc | 1 | ||||
-rw-r--r-- | mypy.ini | 1 | ||||
-rw-r--r-- | tests/storage/test_account_data.py | 4 |
3 files changed, 3 insertions, 3 deletions
diff --git a/changelog.d/11657.misc b/changelog.d/11657.misc new file mode 100644 index 0000000000..8e405b9226 --- /dev/null +++ b/changelog.d/11657.misc @@ -0,0 +1 @@ +Add missing type hints to storage classes. \ No newline at end of file diff --git a/mypy.ini b/mypy.ini index 724c7e2ae4..e0204a3c04 100644 --- a/mypy.ini +++ b/mypy.ini @@ -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 diff --git a/tests/storage/test_account_data.py b/tests/storage/test_account_data.py index 01af49a16b..d697d2bc1e 100644 --- a/tests/storage/test_account_data.py +++ b/tests/storage/test_account_data.py @@ -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 @@ -25,7 +25,7 @@ class IgnoredUsersTestCase(unittest.HomeserverTestCase): 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: |