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

Commit

Permalink
WIP: Making Literal 3.7-proof
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoric committed Jun 2, 2022
1 parent 88ce400 commit a376e60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion synapse/events/spamcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
Collection,
Dict,
List,
Literal,
Optional,
Tuple,
Union,
)

# `Literal` appears with Python 3.8.
from typing_extensions import Literal

from synapse.api.errors import Codes
from synapse.rest.media.v1._base import FileInfo
from synapse.rest.media.v1.media_storage import ReadableFileWrapper
Expand Down
5 changes: 4 additions & 1 deletion tests/rest/client/test_rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
"""Tests REST events for /rooms paths."""

import json
from typing import Any, Dict, Iterable, List, Literal, Optional, Union
from typing import Any, Dict, Iterable, List, Optional, Union
from unittest.mock import Mock, call
from urllib import parse as urlparse

# `Literal` appears with Python 3.8.
from typing_extensions import Literal

from twisted.test.proto_helpers import MemoryReactor

import synapse.rest.admin
Expand Down

0 comments on commit a376e60

Please sign in to comment.