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

Commit

Permalink
Fix re.Pattern mypy error on 3.6 (#9703)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowJonathan committed Mar 29, 2021
1 parent ad8690a commit fc53a60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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

0 comments on commit fc53a60

Please sign in to comment.