Removed legacy usage of Union[]
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
from pathlib import Path
|
||||
from typing import Any, List, Union
|
||||
from typing import Any, List
|
||||
|
||||
import pytest
|
||||
|
||||
from libbot import i18n
|
||||
|
||||
|
||||
@@ -21,7 +20,7 @@ from libbot import i18n
|
||||
async def test_i18n_get(
|
||||
key: str,
|
||||
args: List[str],
|
||||
locale: Union[str, None],
|
||||
locale: str | None,
|
||||
expected: Any,
|
||||
location_locale: Path,
|
||||
):
|
||||
@@ -41,12 +40,8 @@ async def test_i18n_get(
|
||||
("nested", ["callbacks", "default"], ["sure", "авжеж"]),
|
||||
],
|
||||
)
|
||||
async def test_i18n_in_all_locales(
|
||||
key: str, args: List[str], expected: Any, location_locale: Path
|
||||
):
|
||||
assert (
|
||||
await i18n.in_all_locales(key, *args, locales_root=location_locale)
|
||||
) == expected
|
||||
async def test_i18n_in_all_locales(key: str, args: List[str], expected: Any, location_locale: Path):
|
||||
assert (await i18n.in_all_locales(key, *args, locales_root=location_locale)) == expected
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -58,9 +53,5 @@ async def test_i18n_in_all_locales(
|
||||
("nested", ["callbacks", "default"], {"en": "sure", "uk": "авжеж"}),
|
||||
],
|
||||
)
|
||||
async def test_i18n_in_every_locale(
|
||||
key: str, args: List[str], expected: Any, location_locale: Path
|
||||
):
|
||||
assert (
|
||||
await i18n.in_every_locale(key, *args, locales_root=location_locale)
|
||||
) == expected
|
||||
async def test_i18n_in_every_locale(key: str, args: List[str], expected: Any, location_locale: Path):
|
||||
assert (await i18n.in_every_locale(key, *args, locales_root=location_locale)) == expected
|
||||
|
Reference in New Issue
Block a user