Skip to content

Commit

Permalink
Drop typing-extensions dependency as unnecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli committed Mar 18, 2024
1 parent 39e5ba6 commit d5e5d87
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 13 deletions.
3 changes: 1 addition & 2 deletions fluent.runtime/fluent/runtime/bundle.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from typing import TYPE_CHECKING, Any, Callable, Union, cast
from typing import TYPE_CHECKING, Any, Callable, Literal, Union, cast

import babel
import babel.numbers
import babel.plural
from fluent.syntax import ast as FTL
from typing_extensions import Literal

from .builtins import BUILTINS
from .prepare import Compiler
Expand Down
3 changes: 1 addition & 2 deletions fluent.runtime/fluent/runtime/types.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import warnings
from datetime import date, datetime
from decimal import Decimal
from typing import Any, TypeVar, Union, cast
from typing import Any, Literal, TypeVar, Union, cast

import attr
import pytz
from babel import Locale
from babel.dates import format_date, format_time, get_datetime_format, get_timezone
from babel.numbers import NumberPattern, parse_pattern
from typing_extensions import Literal

FORMAT_STYLE_DECIMAL = "decimal"
FORMAT_STYLE_CURRENCY = "currency"
Expand Down
1 change: 0 additions & 1 deletion fluent.runtime/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"attrs",
"babel",
"pytz",
"typing-extensions>=3.7,<5",
],
test_suite="tests",
)
7 changes: 6 additions & 1 deletion fluent.runtime/tests/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@

import pytz
from babel import Locale
from fluent.runtime.types import FluentDateType, FluentNumber, fluent_date, fluent_number
from fluent.runtime.types import (
FluentDateType,
FluentNumber,
fluent_date,
fluent_number,
)


class TestFluentNumber(unittest.TestCase):
Expand Down
1 change: 0 additions & 1 deletion fluent.runtime/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ deps =
attrs==19.1.0
babel==2.7.0
pytz==2019.2
typing-extensions~=3.7
syntax: .
commands = python -m unittest

Expand Down
4 changes: 1 addition & 3 deletions fluent.syntax/fluent/syntax/stream.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from typing import Callable, Union

from typing_extensions import Literal
from typing import Callable, Literal, Union

from .errors import ParseError

Expand Down
1 change: 0 additions & 1 deletion fluent.syntax/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@
packages=["fluent.syntax"],
package_data={"fluent.syntax": ["py.typed"]},
python_requires=">=3.9",
install_requires=["typing-extensions>=3.7,<5"],
test_suite="tests.syntax",
)
2 changes: 0 additions & 2 deletions fluent.syntax/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ skipsdist=True
[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps =
typing-extensions~=3.7
commands = python -m unittest

0 comments on commit d5e5d87

Please sign in to comment.