File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212from types import SimpleNamespace
1313from datetime import datetime
1414from contextlib import contextmanager
15- from typing import List , Callable , Optional
15+ from typing import List , Callable , Optional , Union
1616
1717from babel .support import Translations , NullTranslations
1818from flask import current_app , g
@@ -237,7 +237,7 @@ def _resolve_directories(directories: List[str], app=None):
237237 yield os .path .join (app .root_path , path )
238238
239239
240- def get_translations () -> Translations | NullTranslations :
240+ def get_translations () -> Union [ Translations , NullTranslations ] :
241241 """Returns the correct gettext translations that should be used for
242242 this request. This will never fail and return a dummy translation
243243 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