Add missing type hints to the admin API servlets (#10105)

This commit is contained in:
Dirk Klimpel 2021-06-07 16:12:34 +02:00 committed by GitHub
parent fa1db8f156
commit d558292548
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 48 additions and 40 deletions

View file

@ -13,6 +13,7 @@
# limitations under the License.
import re
from typing import Iterable, Pattern
from synapse.api.auth import Auth
from synapse.api.errors import AuthError
@ -20,7 +21,7 @@ from synapse.http.site import SynapseRequest
from synapse.types import UserID
def admin_patterns(path_regex: str, version: str = "v1"):
def admin_patterns(path_regex: str, version: str = "v1") -> Iterable[Pattern]:
"""Returns the list of patterns for an admin endpoint
Args: