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

Fix re.Pattern mypy error on 3.6 #9703

Merged
merged 2 commits into from
Mar 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/9703.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix undetected mypy error when using Python 3.6.
4 changes: 2 additions & 2 deletions synapse/logging/opentracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def set_fates(clotho, lachesis, atropos, father="Zues", mother="Themis"):
import logging
import re
from functools import wraps
from typing import TYPE_CHECKING, Dict, Optional, Type
from typing import TYPE_CHECKING, Dict, Optional, Pattern, Type

import attr

Expand Down Expand Up @@ -262,7 +262,7 @@ def report_span(self, span):
# Block everything by default
# A regex which matches the server_names to expose traces for.
# None means 'block everything'.
_homeserver_whitelist = None # type: Optional[re.Pattern[str]]
_homeserver_whitelist = None # type: Optional[Pattern[str]]

# Util methods

Expand Down