mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 13:46:02 -04:00
Misc typing fixes for tests
, part 1 of N (#11323)
* Annotate HomeserverTestCase.servlets * Correct annotation of federation_auth_origin * Use AnyStr custom_headers instead of a Union This allows (str, str) and (bytes, bytes). This disallows (str, bytes) and (bytes, str) * DomainSpecificString.SIGIL is a ClassVar
This commit is contained in:
parent
95547e5300
commit
4c96ce396e
7 changed files with 53 additions and 29 deletions
|
@ -19,6 +19,7 @@ from collections import namedtuple
|
|||
from typing import (
|
||||
TYPE_CHECKING,
|
||||
Any,
|
||||
ClassVar,
|
||||
Dict,
|
||||
Mapping,
|
||||
MutableMapping,
|
||||
|
@ -219,7 +220,7 @@ class DomainSpecificString(metaclass=abc.ABCMeta):
|
|||
'domain' : The domain part of the name
|
||||
"""
|
||||
|
||||
SIGIL: str = abc.abstractproperty() # type: ignore
|
||||
SIGIL: ClassVar[str] = abc.abstractproperty() # type: ignore
|
||||
|
||||
localpart = attr.ib(type=str)
|
||||
domain = attr.ib(type=str)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue