File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 12
12
from types import SimpleNamespace
13
13
from datetime import datetime
14
14
from contextlib import contextmanager
15
- from typing import List , Callable , Optional
15
+ from typing import List , Callable , Optional , Union
16
16
17
17
from babel .support import Translations , NullTranslations
18
18
from flask import current_app , g
@@ -237,7 +237,7 @@ def _resolve_directories(directories: List[str], app=None):
237
237
yield os .path .join (app .root_path , path )
238
238
239
239
240
- def get_translations () -> Translations | NullTranslations :
240
+ def get_translations () -> Union [ Translations , NullTranslations ] :
241
241
"""Returns the correct gettext translations that should be used for
242
242
this request. This will never fail and return a dummy translation
243
243
object if used outside the request or if a translation cannot be found.
You can’t perform that action at this time.
0 commit comments