diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0202331..9e3efc72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v6 - uses: astral-sh/setup-uv@v7 with: - python-version: 3.8 + python-version: 3.9 - uses: actions/setup-python@v6 - run: uv sync --dev --all-packages - run: uv run python -m flake8 @@ -23,8 +23,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, windows-2022] - python-version: [3.8, 3.9, "3.10", 3.11, 3.12, pypy3.9, pypy3.10] + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: [3.9, "3.10", 3.11, 3.12, 3.13, 3.14] steps: - uses: actions/checkout@v6 - uses: astral-sh/setup-uv@v7 @@ -48,8 +48,8 @@ jobs: - uses: actions/checkout@v6 - uses: astral-sh/setup-uv@v7 with: - python-version: 3.8 - - run: uv venv --python 3.8 + python-version: 3.9 + - run: uv venv --python 3.9 - run: uv pip install ${{ matrix.fluent-syntax }} - run: uv pip install ./fluent.runtime - run: uv run python -m unittest discover -s fluent.runtime diff --git a/fluent.runtime/fluent/runtime/builtins.py b/fluent.runtime/fluent/runtime/builtins.py index 02e817b8..6833c172 100644 --- a/fluent.runtime/fluent/runtime/builtins.py +++ b/fluent.runtime/fluent/runtime/builtins.py @@ -1,4 +1,4 @@ -from typing import Callable, Dict +from typing import Callable from .types import FluentType, fluent_date, fluent_number @@ -6,7 +6,7 @@ DATETIME = fluent_date -BUILTINS: Dict[str, Callable[..., FluentType]] = { +BUILTINS: dict[str, Callable[..., FluentType]] = { "NUMBER": NUMBER, "DATETIME": DATETIME, } diff --git a/fluent.runtime/fluent/runtime/bundle.py b/fluent.runtime/fluent/runtime/bundle.py index a88fdab7..92db7d82 100644 --- a/fluent.runtime/fluent/runtime/bundle.py +++ b/fluent.runtime/fluent/runtime/bundle.py @@ -1,10 +1,9 @@ -from typing import TYPE_CHECKING, Any, Callable, Dict, List, Tuple, 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 @@ -34,16 +33,16 @@ class FluentBundle: def __init__( self, - locales: List[str], - functions: Union[Dict[str, Callable[..., "FluentType"]], None] = None, + locales: list[str], + functions: Union[dict[str, Callable[..., "FluentType"]], None] = None, use_isolating: bool = True, ): self.locales = locales self._functions = {**BUILTINS, **(functions or {})} self.use_isolating = use_isolating - self._messages: Dict[str, Union[FTL.Message, FTL.Term]] = {} - self._terms: Dict[str, Union[FTL.Message, FTL.Term]] = {} - self._compiled: Dict[str, Message] = {} + self._messages: dict[str, Union[FTL.Message, FTL.Term]] = {} + self._terms: dict[str, Union[FTL.Message, FTL.Term]] = {} + self._compiled: dict[str, Message] = {} # The compiler is not typed, and this cast is only valid for the public API self._compiler = cast( Callable[[Union[FTL.Message, FTL.Term]], Message], Compiler() @@ -90,8 +89,8 @@ def _lookup(self, entry_id: str, term: bool = False) -> Message: return self._compiled[compiled_id] def format_pattern( - self, pattern: Pattern, args: Union[Dict[str, Any], None] = None - ) -> Tuple[Union[str, "FluentNone"], List[Exception]]: + self, pattern: Pattern, args: Union[dict[str, Any], None] = None + ) -> tuple[Union[str, "FluentNone"], list[Exception]]: if args is not None: fluent_args = { argname: native_to_fluent(argvalue) @@ -100,7 +99,7 @@ def format_pattern( else: fluent_args = {} - errors: List[Exception] = [] + errors: list[Exception] = [] env = ResolverEnvironment( context=self, current=CurrentEnvironment(args=fluent_args), errors=errors ) diff --git a/fluent.runtime/fluent/runtime/fallback.py b/fluent.runtime/fluent/runtime/fallback.py index 2fb6c85f..831d4288 100644 --- a/fluent.runtime/fluent/runtime/fallback.py +++ b/fluent.runtime/fluent/runtime/fallback.py @@ -1,16 +1,7 @@ import codecs import os -from typing import ( - TYPE_CHECKING, - Any, - Callable, - Dict, - Generator, - List, - Type, - Union, - cast, -) +from collections.abc import Generator +from typing import TYPE_CHECKING, Any, Callable, Union, cast from fluent.syntax import FluentParser from typing import NamedTuple @@ -25,7 +16,7 @@ class FormattedMessage(NamedTuple): value: Union[str, None] - attributes: Dict[str, str] + attributes: dict[str, str] class FluentLocalization: @@ -38,12 +29,12 @@ class FluentLocalization: def __init__( self, - locales: List[str], - resource_ids: List[str], + locales: list[str], + resource_ids: list[str], resource_loader: "AbstractResourceLoader", use_isolating: bool = False, - bundle_class: Type[FluentBundle] = FluentBundle, - functions: Union[Dict[str, Callable[[Any], "FluentType"]], None] = None, + bundle_class: type[FluentBundle] = FluentBundle, + functions: Union[dict[str, Callable[[Any], "FluentType"]], None] = None, ): self.locales = locales self.resource_ids = resource_ids @@ -51,11 +42,11 @@ def __init__( self.use_isolating = use_isolating self.bundle_class = bundle_class self.functions = functions - self._bundle_cache: List[FluentBundle] = [] + self._bundle_cache: list[FluentBundle] = [] self._bundle_it = self._iterate_bundles() def format_message( - self, msg_id: str, args: Union[Dict[str, Any], None] = None + self, msg_id: str, args: Union[dict[str, Any], None] = None ) -> FormattedMessage: bundle, msg = next(( (bundle, bundle.get_message(msg_id)) @@ -82,7 +73,7 @@ def format_message( ) def format_value( - self, msg_id: str, args: Union[Dict[str, Any], None] = None + self, msg_id: str, args: Union[dict[str, Any], None] = None ) -> str: bundle, msg = next(( (bundle, bundle.get_message(msg_id)) @@ -96,7 +87,7 @@ def format_value( str, val ) # Never FluentNone when format_pattern called externally - def _create_bundle(self, locales: List[str]) -> FluentBundle: + def _create_bundle(self, locales: list[str]) -> FluentBundle: return self.bundle_class( locales, functions=self.functions, use_isolating=self.use_isolating ) @@ -128,8 +119,8 @@ class AbstractResourceLoader: """ def resources( - self, locale: str, resource_ids: List[str] - ) -> Generator[List["Resource"], None, None]: + self, locale: str, resource_ids: list[str] + ) -> Generator[list["Resource"], None, None]: """ Yield lists of FluentResource objects, corresponding to each of the resource_ids. @@ -151,7 +142,7 @@ class FluentResourceLoader(AbstractResourceLoader): different roots. """ - def __init__(self, roots: Union[str, List[str]]): + def __init__(self, roots: Union[str, list[str]]): """ Create a resource loader. The roots may be a string for a single location on disk, or a list of strings. @@ -159,10 +150,10 @@ def __init__(self, roots: Union[str, List[str]]): self.roots = [roots] if isinstance(roots, str) else roots def resources( - self, locale: str, resource_ids: List[str] - ) -> Generator[List["Resource"], None, None]: + self, locale: str, resource_ids: list[str] + ) -> Generator[list["Resource"], None, None]: for root in self.roots: - resources: List[Any] = [] + resources: list[Any] = [] for resource_id in resource_ids: path = self.localize_path(os.path.join(root, resource_id), locale) if not os.path.isfile(path): diff --git a/fluent.runtime/fluent/runtime/prepare.py b/fluent.runtime/fluent/runtime/prepare.py index 418b33ba..b14aea0b 100644 --- a/fluent.runtime/fluent/runtime/prepare.py +++ b/fluent.runtime/fluent/runtime/prepare.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List +from typing import Any from fluent.syntax import ast as FTL @@ -17,7 +17,7 @@ def compile(self, node: Any) -> Any: nodename: str = type(node).__name__ if not hasattr(resolver, nodename): return node - kwargs: Dict[str, Any] = vars(node).copy() + kwargs: dict[str, Any] = vars(node).copy() for propname, propvalue in kwargs.items(): kwargs[propname] = self(propvalue) handler = getattr(self, "compile_" + nodename, self.compile_generic) @@ -31,7 +31,7 @@ def compile_Placeable(self, _: Any, expression: Any, **kwargs: Any) -> Any: return expression return resolver.Placeable(expression=expression, **kwargs) - def compile_Pattern(self, _: Any, elements: List[Any], **kwargs: Any) -> Any: + def compile_Pattern(self, _: Any, elements: list[Any], **kwargs: Any) -> Any: if len(elements) == 1 and isinstance(elements[0], resolver.Placeable): # Don't isolate isolated placeables return resolver.NeverIsolatingPlaceable(elements[0].expression) diff --git a/fluent.runtime/fluent/runtime/resolver.py b/fluent.runtime/fluent/runtime/resolver.py index 1961a960..b42b14c3 100644 --- a/fluent.runtime/fluent/runtime/resolver.py +++ b/fluent.runtime/fluent/runtime/resolver.py @@ -1,5 +1,6 @@ import contextlib -from typing import TYPE_CHECKING, Any, Dict, Generator, List, Set, Union, cast +from collections.abc import Generator +from typing import TYPE_CHECKING, Any, Union, cast import attr from fluent.syntax import ast as FTL @@ -42,7 +43,7 @@ class CurrentEnvironment: # For Messages, VariableReference nodes are interpreted as external args, # but for Terms they are the values explicitly passed using CallExpression # syntax. So we have to be able to change 'args' for this purpose. - args: Dict[str, Any] = attr.ib(factory=dict) + args: dict[str, Any] = attr.ib(factory=dict) # This controls whether we need to report an error if a VariableReference # refers to an arg that is not present in the args dict. error_for_missing_arg: bool = attr.ib(default=True) @@ -51,9 +52,9 @@ class CurrentEnvironment: @attr.s class ResolverEnvironment: context: "FluentBundle" = attr.ib() - errors: List[Exception] = attr.ib() + errors: list[Exception] = attr.ib() part_count: int = attr.ib(default=0, init=False) - active_patterns: Set[FTL.Pattern] = attr.ib(factory=set, init=False) + active_patterns: set[FTL.Pattern] = attr.ib(factory=set, init=False) current: CurrentEnvironment = attr.ib(factory=CurrentEnvironment) @contextlib.contextmanager @@ -72,7 +73,7 @@ def modified( self.current = old_current def modified_for_term_reference( - self, args: Union[Dict[str, Any], None] = None + self, args: Union[dict[str, Any], None] = None ) -> Any: return self.modified( args=args if args is not None else {}, error_for_missing_arg=False @@ -100,13 +101,13 @@ class Literal(BaseResolver): class Message(FTL.Entry, BaseResolver): id: "Identifier" value: Union["Pattern", None] - attributes: Dict[str, "Pattern"] + attributes: dict[str, "Pattern"] def __init__( self, id: "Identifier", value: Union["Pattern", None] = None, - attributes: Union[List["Attribute"], None] = None, + attributes: Union[list["Attribute"], None] = None, comment: Any = None, **kwargs: Any, ): @@ -121,13 +122,13 @@ def __init__( class Term(FTL.Entry, BaseResolver): id: "Identifier" value: "Pattern" - attributes: Dict[str, "Pattern"] + attributes: dict[str, "Pattern"] def __init__( self, id: "Identifier", value: "Pattern", - attributes: Union[List["Attribute"], None] = None, + attributes: Union[list["Attribute"], None] = None, comment: Any = None, **kwargs: Any, ): @@ -143,7 +144,7 @@ class Pattern(FTL.Pattern, BaseResolver): # Prevent messages with too many sub parts, for CPI DOS protection MAX_PARTS = 1000 - elements: List[Union["TextElement", "Placeable"]] # type: ignore + elements: list[Union["TextElement", "Placeable"]] # type: ignore def __init__(self, *args: Any, **kwargs: Any): super().__init__(*args, **kwargs) @@ -294,7 +295,7 @@ def __call__(self, env: ResolverEnvironment) -> Any: if isinstance(arg_val, (FluentType, str)): return arg_val env.errors.append( - TypeError("Unsupported external type: {}, {}".format(name, type(arg_val))) + TypeError(f"Unsupported external type: {name}, {type(arg_val)}") ) return FluentNone(name) @@ -306,7 +307,7 @@ class Attribute(FTL.Attribute, BaseResolver): class SelectExpression(FTL.SelectExpression, BaseResolver): selector: "InlineExpression" - variants: List["Variant"] # type: ignore + variants: list["Variant"] # type: ignore def __call__(self, env: ResolverEnvironment) -> Union[str, FluentNone]: key = self.selector(env) @@ -368,8 +369,8 @@ def __call__(self, env: ResolverEnvironment) -> str: class CallArguments(FTL.CallArguments, BaseResolver): - positional: List[Union["InlineExpression", Placeable]] # type: ignore - named: List["NamedArgument"] # type: ignore + positional: list[Union["InlineExpression", Placeable]] # type: ignore + named: list["NamedArgument"] # type: ignore class FunctionReference(FTL.FunctionReference, BaseResolver): @@ -384,7 +385,7 @@ def __call__(self, env: ResolverEnvironment) -> Any: function = env.context._functions[function_name] except LookupError: env.errors.append( - FluentReferenceError("Unknown function: {}".format(function_name)) + FluentReferenceError(f"Unknown function: {function_name}") ) return FluentNone(function_name + "()") diff --git a/fluent.runtime/fluent/runtime/types.py b/fluent.runtime/fluent/runtime/types.py index 697a18b7..c6717194 100644 --- a/fluent.runtime/fluent/runtime/types.py +++ b/fluent.runtime/fluent/runtime/types.py @@ -1,14 +1,13 @@ import warnings from datetime import date, datetime from decimal import Decimal -from typing import Any, Dict, Type, 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" @@ -106,7 +105,7 @@ def __new__( return self._init(value, kwargs) def _init( - self, value: Union[int, float, Decimal, "FluentNumber"], kwargs: Dict[str, Any] + self, value: Union[int, float, Decimal, "FluentNumber"], kwargs: dict[str, Any] ) -> "FluentNumber": self.options = merge_options( NumberFormatOptions, @@ -211,7 +210,7 @@ def replacer(s: str) -> str: def merge_options( - options_class: Type[Options], base: Union[Options, None], kwargs: Dict[str, Any] + options_class: type[Options], base: Union[Options, None], kwargs: dict[str, Any] ) -> Options: """ Given an 'options_class', an optional 'base' object to copy from, @@ -346,7 +345,7 @@ class FluentDateType(FluentType): # So we leave those alone, and implement another `_init_options` # which is called from other constructors. def _init_options( - self, dt_obj: Union[date, datetime], kwargs: Dict[str, Any] + self, dt_obj: Union[date, datetime], kwargs: dict[str, Any] ) -> None: if "timeStyle" in kwargs and not isinstance(self, datetime): raise TypeError( @@ -437,6 +436,4 @@ def fluent_date( elif isinstance(dt, FluentNone): return dt else: - raise TypeError( - "Can't use fluent_date with object {} of type {}".format(dt, type(dt)) - ) + raise TypeError(f"Can't use fluent_date with object {dt} of type {type(dt)}") diff --git a/fluent.runtime/pyproject.toml b/fluent.runtime/pyproject.toml index 163f7cb4..8679443d 100644 --- a/fluent.runtime/pyproject.toml +++ b/fluent.runtime/pyproject.toml @@ -1,13 +1,12 @@ [project] name = "fluent.runtime" version = "0.4.0" -requires-python = ">= 3.8" +requires-python = ">= 3.9" dependencies = [ "fluent.syntax>=0.17,<0.20", "attrs", "babel", "pytz", - "typing-extensions>=3.7,<5", ] license = { text = "Apache-2.0" } description = "Localization library for expressive translations." @@ -21,8 +20,12 @@ classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3 :: Only", ] diff --git a/fluent.runtime/tools/benchmarks/fluent_benchmark.py b/fluent.runtime/tools/benchmarks/fluent_benchmark.py index d80de407..83f42912 100644 --- a/fluent.runtime/tools/benchmarks/fluent_benchmark.py +++ b/fluent.runtime/tools/benchmarks/fluent_benchmark.py @@ -1,7 +1,6 @@ #!/usr/bin/env python # This should be run using pytest -from __future__ import unicode_literals import sys @@ -48,7 +47,7 @@ def fluent_template(bundle): ) -class TestBenchmark(object): +class TestBenchmark: def test_template(self, fluent_bundle, benchmark): benchmark(lambda: fluent_template(fluent_bundle)) diff --git a/fluent.syntax/fluent/syntax/ast.py b/fluent.syntax/fluent/syntax/ast.py index c47244e5..c13ee1c7 100644 --- a/fluent.syntax/fluent/syntax/ast.py +++ b/fluent.syntax/fluent/syntax/ast.py @@ -1,10 +1,10 @@ import json import re import sys -from typing import Any, Callable, Dict, List, TypeVar, Union, cast +from typing import Any, Callable, TypeVar, Union, cast Node = TypeVar("Node", bound="BaseNode") -ToJsonFn = Callable[[Dict[str, Any]], Any] +ToJsonFn = Callable[[dict[str, Any]], Any] def to_json(value: Any, fn: Union[ToJsonFn, None] = None) -> Any: @@ -29,7 +29,7 @@ def from_json(value: Any) -> Any: return value -def scalars_equal(node1: Any, node2: Any, ignored_fields: List[str]) -> bool: +def scalars_equal(node1: Any, node2: Any, ignored_fields: list[str]) -> bool: """Compare two nodes which are not lists.""" if type(node1) is not type(node2): @@ -66,7 +66,7 @@ def visit(value: Any) -> Any: **{name: visit(value) for name, value in vars(self).items()} ) - def equals(self, other: "BaseNode", ignored_fields: List[str] = ["span"]) -> bool: + def equals(self, other: "BaseNode", ignored_fields: list[str] = ["span"]) -> bool: """Compare two nodes. Nodes are deeply compared on a field by field basis. If possible, False @@ -126,7 +126,7 @@ def add_span(self, start: int, end: int) -> None: class Resource(SyntaxNode): - def __init__(self, body: Union[List["EntryType"], None] = None, **kwargs: Any): + def __init__(self, body: Union[list["EntryType"], None] = None, **kwargs: Any): super().__init__(**kwargs) self.body = body or [] @@ -140,7 +140,7 @@ def __init__( self, id: "Identifier", value: Union["Pattern", None] = None, - attributes: Union[List["Attribute"], None] = None, + attributes: Union[list["Attribute"], None] = None, comment: Union["Comment", None] = None, **kwargs: Any ): @@ -156,7 +156,7 @@ def __init__( self, id: "Identifier", value: "Pattern", - attributes: Union[List["Attribute"], None] = None, + attributes: Union[list["Attribute"], None] = None, comment: Union["Comment", None] = None, **kwargs: Any ): @@ -169,7 +169,7 @@ def __init__( class Pattern(SyntaxNode): def __init__( - self, elements: List[Union["TextElement", "Placeable"]], **kwargs: Any + self, elements: list[Union["TextElement", "Placeable"]], **kwargs: Any ): super().__init__(**kwargs) self.elements = elements @@ -206,12 +206,12 @@ def __init__(self, value: str, **kwargs: Any): super().__init__(**kwargs) self.value = value - def parse(self) -> Dict[str, Any]: + def parse(self) -> dict[str, Any]: return {"value": self.value} class StringLiteral(Literal): - def parse(self) -> Dict[str, str]: + def parse(self) -> dict[str, str]: def from_escape_sequence(matchobj: Any) -> str: c, codepoint4, codepoint6 = matchobj.groups() if c: @@ -233,7 +233,7 @@ def from_escape_sequence(matchobj: Any) -> str: class NumberLiteral(Literal): - def parse(self) -> Dict[str, Union[float, int]]: + def parse(self) -> dict[str, Union[float, int]]: value = float(self.value) decimal_position = self.value.find(".") precision = 0 @@ -283,7 +283,7 @@ def __init__(self, id: "Identifier", arguments: "CallArguments", **kwargs: Any): class SelectExpression(Expression): def __init__( - self, selector: "InlineExpression", variants: List["Variant"], **kwargs: Any + self, selector: "InlineExpression", variants: list["Variant"], **kwargs: Any ): super().__init__(**kwargs) self.selector = selector @@ -293,8 +293,8 @@ def __init__( class CallArguments(SyntaxNode): def __init__( self, - positional: Union[List[Union["InlineExpression", Placeable]], None] = None, - named: Union[List["NamedArgument"], None] = None, + positional: Union[list[Union["InlineExpression", Placeable]], None] = None, + named: Union[list["NamedArgument"], None] = None, **kwargs: Any ): super().__init__(**kwargs) @@ -366,7 +366,7 @@ class Junk(SyntaxNode): def __init__( self, content: Union[str, None] = None, - annotations: Union[List["Annotation"], None] = None, + annotations: Union[list["Annotation"], None] = None, **kwargs: Any ): super().__init__(**kwargs) @@ -388,7 +388,7 @@ class Annotation(SyntaxNode): def __init__( self, code: str, - arguments: Union[List[Any], None] = None, + arguments: Union[list[Any], None] = None, message: Union[str, None] = None, **kwargs: Any ): diff --git a/fluent.syntax/fluent/syntax/errors.py b/fluent.syntax/fluent/syntax/errors.py index b6a59f5b..baa98113 100644 --- a/fluent.syntax/fluent/syntax/errors.py +++ b/fluent.syntax/fluent/syntax/errors.py @@ -1,4 +1,4 @@ -from typing import Tuple, Union +from typing import Union class ParseError(Exception): @@ -8,15 +8,15 @@ def __init__(self, code: str, *args: Union[str, None]): self.message = get_error_message(code, args) -def get_error_message(code: str, args: Tuple[Union[str, None], ...]) -> str: +def get_error_message(code: str, args: tuple[Union[str, None], ...]) -> str: if code == "E00001": return "Generic error" if code == "E0002": return "Expected an entry start" if code == "E0003": - return 'Expected token: "{}"'.format(args[0]) + return f'Expected token: "{args[0]}"' if code == "E0004": - return 'Expected a character from range: "{}"'.format(args[0]) + return f'Expected a character from range: "{args[0]}"' if code == "E0005": msg = 'Expected message "{}" to have a value or attributes' return msg.format(args[0]) @@ -58,9 +58,9 @@ def get_error_message(code: str, args: Tuple[Union[str, None], ...]) -> str: if code == "E0024": return "Cannot access variants of a message." if code == "E0025": - return "Unknown escape sequence: \\{}.".format(args[0]) + return f"Unknown escape sequence: \\{args[0]}." if code == "E0026": - return "Invalid Unicode escape sequence: {}.".format(args[0]) + return f"Invalid Unicode escape sequence: {args[0]}." if code == "E0027": return "Unbalanced closing brace in TextElement." if code == "E0028": diff --git a/fluent.syntax/fluent/syntax/parser.py b/fluent.syntax/fluent/syntax/parser.py index 5999f97c..5888c448 100644 --- a/fluent.syntax/fluent/syntax/parser.py +++ b/fluent.syntax/fluent/syntax/parser.py @@ -1,5 +1,5 @@ import re -from typing import Any, Callable, List, Set, TypeVar, Union, cast +from typing import Any, Callable, TypeVar, Union, cast from . import ast from .errors import ParseError @@ -45,7 +45,7 @@ def parse(self, source: str) -> ast.Resource: ps = FluentParserStream(source) ps.skip_blank_block() - entries: List[ast.EntryType] = [] + entries: list[ast.EntryType] = [] last_comment = None while ps.current_char: @@ -236,8 +236,8 @@ def get_attribute(self, ps: FluentParserStream) -> ast.Attribute: return ast.Attribute(key, value) - def get_attributes(self, ps: FluentParserStream) -> List[ast.Attribute]: - attrs: List[ast.Attribute] = [] + def get_attributes(self, ps: FluentParserStream) -> list[ast.Attribute]: + attrs: list[ast.Attribute] = [] ps.peek_blank() while ps.is_attribute_start(): @@ -299,8 +299,8 @@ def get_variant(self, ps: FluentParserStream, has_default: bool) -> ast.Variant: return ast.Variant(key, value, default_index) - def get_variants(self, ps: FluentParserStream) -> List[ast.Variant]: - variants: List[ast.Variant] = [] + def get_variants(self, ps: FluentParserStream) -> list[ast.Variant]: + variants: list[ast.Variant] = [] has_default = False ps.skip_blank() @@ -376,7 +376,7 @@ def maybe_get_pattern(self, ps: FluentParserStream) -> Union[ast.Pattern, None]: @with_span def get_pattern(self, ps: FluentParserStream, is_block: bool) -> ast.Pattern: - elements: List[Any] = [] + elements: list[Any] = [] if is_block: # A block pattern is a pattern which starts on a new line. Measure # the indent of this first line for the dedentation logic. @@ -422,20 +422,20 @@ def get_pattern(self, ps: FluentParserStream, is_block: bool) -> ast.Pattern: class Indent(ast.SyntaxNode): def __init__(self, value: str, start: int, end: int): - super(FluentParser.Indent, self).__init__() + super().__init__() self.value = value self.add_span(start, end) def dedent( self, - elements: List[Union[ast.TextElement, ast.Placeable, Indent]], + elements: list[Union[ast.TextElement, ast.Placeable, Indent]], common_indent: int, - ) -> List[Union[ast.TextElement, ast.Placeable]]: + ) -> list[Union[ast.TextElement, ast.Placeable]]: """Dedent a list of elements by removing the maximum common indent from the beginning of text lines. The common indent is calculated in get_pattern. """ - trimmed: List[Union[ast.TextElement, ast.Placeable]] = [] + trimmed: list[Union[ast.TextElement, ast.Placeable]] = [] for element in elements: if isinstance(element, ast.Placeable): @@ -660,9 +660,9 @@ def get_call_argument( @with_span def get_call_arguments(self, ps: FluentParserStream) -> ast.CallArguments: - positional: List[Union[ast.InlineExpression, ast.Placeable]] = [] - named: List[ast.NamedArgument] = [] - argument_names: Set[str] = set() + positional: list[Union[ast.InlineExpression, ast.Placeable]] = [] + named: list[ast.NamedArgument] = [] + argument_names: set[str] = set() ps.expect_char("(") ps.skip_blank() diff --git a/fluent.syntax/fluent/syntax/serializer.py b/fluent.syntax/fluent/syntax/serializer.py index 3659154c..414dce19 100644 --- a/fluent.syntax/fluent/syntax/serializer.py +++ b/fluent.syntax/fluent/syntax/serializer.py @@ -1,4 +1,4 @@ -from typing import List, Union +from typing import Union from . import ast @@ -46,11 +46,11 @@ def __init__(self, with_junk: bool = False): def serialize(self, resource: ast.Resource) -> str: "Serialize a :class:`.ast.Resource` to a string." if not isinstance(resource, ast.Resource): - raise Exception("Unknown resource type: {}".format(type(resource))) + raise Exception(f"Unknown resource type: {type(resource)}") state = 0 - parts: List[str] = [] + parts: list[str] = [] for entry in resource.body: if not isinstance(entry, ast.Junk) or self.with_junk: parts.append(self.serialize_entry(entry, state)) @@ -79,7 +79,7 @@ def serialize_entry(self, entry: ast.EntryType, state: int = 0) -> str: return "{}\n".format(serialize_comment(entry, "###")) if isinstance(entry, ast.Junk): return serialize_junk(entry) - raise Exception("Unknown entry type: {}".format(type(entry))) + raise Exception(f"Unknown entry type: {type(entry)}") def serialize_comment( @@ -104,7 +104,7 @@ def serialize_junk(junk: ast.Junk) -> str: def serialize_message(message: ast.Message) -> str: - parts: List[str] = [] + parts: list[str] = [] if message.comment: parts.append(serialize_comment(message.comment)) @@ -123,7 +123,7 @@ def serialize_message(message: ast.Message) -> str: def serialize_term(term: ast.Term) -> str: - parts: List[str] = [] + parts: list[str] = [] if term.comment: parts.append(serialize_comment(term.comment)) @@ -160,20 +160,20 @@ def serialize_element(element: ast.PatternElement) -> str: return element.value if isinstance(element, ast.Placeable): return serialize_placeable(element) - raise Exception("Unknown element type: {}".format(type(element))) + raise Exception(f"Unknown element type: {type(element)}") def serialize_placeable(placeable: ast.Placeable) -> str: expr = placeable.expression if isinstance(expr, ast.Placeable): - return "{{{}}}".format(serialize_placeable(expr)) + return f"{{{serialize_placeable(expr)}}}" if isinstance(expr, ast.SelectExpression): # Special-case select expressions to control the withespace around the # opening and the closing brace. - return "{{ {}}}".format(serialize_expression(expr)) + return f"{{ {serialize_expression(expr)}}}" if isinstance(expr, ast.Expression): - return "{{ {} }}".format(serialize_expression(expr)) - raise Exception("Unknown expression type: {}".format(type(expr))) + return f"{{ {serialize_expression(expr)} }}" + raise Exception(f"Unknown expression type: {type(expr)}") def serialize_expression(expression: Union[ast.Expression, ast.Placeable]) -> str: @@ -199,13 +199,13 @@ def serialize_expression(expression: Union[ast.Expression, ast.Placeable]) -> st args = serialize_call_arguments(expression.arguments) return f"{expression.id.name}{args}" if isinstance(expression, ast.SelectExpression): - out = "{} ->".format(serialize_expression(expression.selector)) + out = f"{serialize_expression(expression.selector)} ->" for variant in expression.variants: out += serialize_variant(variant) return f"{out}\n" if isinstance(expression, ast.Placeable): return serialize_placeable(expression) - raise Exception("Unknown expression type: {}".format(type(expression))) + raise Exception(f"Unknown expression type: {type(expression)}") def serialize_variant(variant: ast.Variant) -> str: @@ -221,11 +221,11 @@ def serialize_call_arguments(expr: ast.CallArguments) -> str: named = ", ".join(serialize_named_argument(arg) for arg in expr.named) if len(expr.positional) > 0 and len(expr.named) > 0: return f"({positional}, {named})" - return "({})".format(positional or named) + return f"({positional or named})" def serialize_named_argument(arg: ast.NamedArgument) -> str: - return "{}: {}".format(arg.name.name, serialize_expression(arg.value)) + return f"{arg.name.name}: {serialize_expression(arg.value)}" def serialize_variant_key(key: Union[ast.Identifier, ast.NumberLiteral]) -> str: @@ -233,4 +233,4 @@ def serialize_variant_key(key: Union[ast.Identifier, ast.NumberLiteral]) -> str: return key.name if isinstance(key, ast.NumberLiteral): return key.value - raise Exception("Unknown variant key type: {}".format(type(key))) + raise Exception(f"Unknown variant key type: {type(key)}") diff --git a/fluent.syntax/fluent/syntax/stream.py b/fluent.syntax/fluent/syntax/stream.py index 0e276fc3..2a485e22 100644 --- a/fluent.syntax/fluent/syntax/stream.py +++ b/fluent.syntax/fluent/syntax/stream.py @@ -1,6 +1,4 @@ -from typing import Callable, Union - -from typing_extensions import Literal +from typing import Callable, Literal, Union from .errors import ParseError diff --git a/fluent.syntax/fluent/syntax/visitor.py b/fluent.syntax/fluent/syntax/visitor.py index 2f637afb..53fea500 100644 --- a/fluent.syntax/fluent/syntax/visitor.py +++ b/fluent.syntax/fluent/syntax/visitor.py @@ -1,4 +1,4 @@ -from typing import Any, List +from typing import Any from .ast import BaseNode, Node @@ -50,7 +50,7 @@ def visit(self, node: Any) -> Any: def generic_visit(self, node: Node) -> Node: # type: ignore for propname, propvalue in vars(node).items(): if isinstance(propvalue, list): - new_vals: List[Any] = [] + new_vals: list[Any] = [] for child in propvalue: new_val = self.visit(child) if new_val is not None: diff --git a/fluent.syntax/pyproject.toml b/fluent.syntax/pyproject.toml index 013291fb..5a0ba99a 100644 --- a/fluent.syntax/pyproject.toml +++ b/fluent.syntax/pyproject.toml @@ -1,8 +1,7 @@ [project] name = "fluent.syntax" version = "0.19.0" -requires-python = ">= 3.8" -dependencies = ["typing-extensions>=3.7,<5"] +requires-python = ">= 3.9" license = { text = "Apache-2.0" } description = "Localization library for expressive translations." keywords = ["fluent", "localization", "l10n"] @@ -14,8 +13,12 @@ classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3 :: Only", ] diff --git a/pyproject.toml b/pyproject.toml index 567f3ca0..8ff24004 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "python-fluent" version = "0" -requires-python = ">= 3.8.1" +requires-python = ">= 3.9" dependencies = [ "fluent.syntax", "black ~= 24.0", diff --git a/uv.lock b/uv.lock index 777227e3..44fcc13e 100644 --- a/uv.lock +++ b/uv.lock @@ -1,10 +1,9 @@ version = 1 revision = 3 -requires-python = ">=3.8.1" +requires-python = ">=3.9" resolution-markers = [ "python_full_version >= '3.10'", - "python_full_version == '3.9.*'", - "python_full_version < '3.9'", + "python_full_version < '3.10'", ] [manifest] @@ -14,26 +13,10 @@ members = [ "python-fluent", ] -[[package]] -name = "attrs" -version = "25.3.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.9'", -] -sdist = { url = "https://files.pythonhosted.org/packages/5a/b0/1367933a8532ee6ff8d63537de4f1177af4bff9f3e829baf7331f595bb24/attrs-25.3.0.tar.gz", hash = "sha256:75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b", size = 812032, upload-time = "2025-03-13T11:10:22.779Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/77/06/bb80f5f86020c4551da315d78b3ab75e8228f89f0162f2c3a819e407941a/attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3", size = 63815, upload-time = "2025-03-13T11:10:21.14Z" }, -] - [[package]] name = "attrs" version = "25.4.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", - "python_full_version == '3.9.*'", -] sdist = { url = "https://files.pythonhosted.org/packages/6b/5c/685e6633917e101e5dcb62b9dd76946cbb57c26e133bae9e0cd36033c0a9/attrs-25.4.0.tar.gz", hash = "sha256:16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11", size = 934251, upload-time = "2025-10-06T13:54:44.725Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/3a/2a/7cc015f5b9f5db42b7d48157e23356022889fc354a2813c15934b7cb5c0e/attrs-25.4.0-py3-none-any.whl", hash = "sha256:adcf7e2a1fb3b36ac48d97835bb6d8ade15b8dcce26aba8bf1d14847b57a3373", size = 67615, upload-time = "2025-10-06T13:54:43.17Z" }, @@ -43,73 +26,25 @@ wheels = [ name = "babel" version = "2.17.0" source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "pytz", marker = "python_full_version < '3.9'" }, -] sdist = { url = "https://files.pythonhosted.org/packages/7d/6b/d52e42361e1aa00709585ecc30b3f9684b3ab62530771402248b1b1d6240/babel-2.17.0.tar.gz", hash = "sha256:0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d", size = 9951852, upload-time = "2025-02-01T15:17:41.026Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/b7/b8/3fe70c75fe32afc4bb507f75563d39bc5642255d1d94f1f23604725780bf/babel-2.17.0-py3-none-any.whl", hash = "sha256:4d0b53093fdfb4b21c92b5213dba5a1b23885afa8383709427046b21c366e5f2", size = 10182537, upload-time = "2025-02-01T15:17:37.39Z" }, ] -[[package]] -name = "black" -version = "24.8.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.9'", -] -dependencies = [ - { name = "click", version = "8.1.8", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, - { name = "mypy-extensions", marker = "python_full_version < '3.9'" }, - { name = "packaging", marker = "python_full_version < '3.9'" }, - { name = "pathspec", marker = "python_full_version < '3.9'" }, - { name = "platformdirs", version = "4.3.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, - { name = "tomli", marker = "python_full_version < '3.9'" }, - { name = "typing-extensions", version = "4.13.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/04/b0/46fb0d4e00372f4a86a6f8efa3cb193c9f64863615e39010b1477e010578/black-24.8.0.tar.gz", hash = "sha256:2500945420b6784c38b9ee885af039f5e7471ef284ab03fa35ecdde4688cd83f", size = 644810, upload-time = "2024-08-02T17:43:18.405Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/47/6e/74e29edf1fba3887ed7066930a87f698ffdcd52c5dbc263eabb06061672d/black-24.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:09cdeb74d494ec023ded657f7092ba518e8cf78fa8386155e4a03fdcc44679e6", size = 1632092, upload-time = "2024-08-02T17:47:26.911Z" }, - { url = "https://files.pythonhosted.org/packages/ab/49/575cb6c3faee690b05c9d11ee2e8dba8fbd6d6c134496e644c1feb1b47da/black-24.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:81c6742da39f33b08e791da38410f32e27d632260e599df7245cccee2064afeb", size = 1457529, upload-time = "2024-08-02T17:47:29.109Z" }, - { url = "https://files.pythonhosted.org/packages/7a/b4/d34099e95c437b53d01c4aa37cf93944b233066eb034ccf7897fa4e5f286/black-24.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:707a1ca89221bc8a1a64fb5e15ef39cd755633daa672a9db7498d1c19de66a42", size = 1757443, upload-time = "2024-08-02T17:46:20.306Z" }, - { url = "https://files.pythonhosted.org/packages/87/a0/6d2e4175ef364b8c4b64f8441ba041ed65c63ea1db2720d61494ac711c15/black-24.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:d6417535d99c37cee4091a2f24eb2b6d5ec42b144d50f1f2e436d9fe1916fe1a", size = 1418012, upload-time = "2024-08-02T17:47:20.33Z" }, - { url = "https://files.pythonhosted.org/packages/08/a6/0a3aa89de9c283556146dc6dbda20cd63a9c94160a6fbdebaf0918e4a3e1/black-24.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fb6e2c0b86bbd43dee042e48059c9ad7830abd5c94b0bc518c0eeec57c3eddc1", size = 1615080, upload-time = "2024-08-02T17:48:05.467Z" }, - { url = "https://files.pythonhosted.org/packages/db/94/b803d810e14588bb297e565821a947c108390a079e21dbdcb9ab6956cd7a/black-24.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:837fd281f1908d0076844bc2b801ad2d369c78c45cf800cad7b61686051041af", size = 1438143, upload-time = "2024-08-02T17:47:30.247Z" }, - { url = "https://files.pythonhosted.org/packages/a5/b5/f485e1bbe31f768e2e5210f52ea3f432256201289fd1a3c0afda693776b0/black-24.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:62e8730977f0b77998029da7971fa896ceefa2c4c4933fcd593fa599ecbf97a4", size = 1738774, upload-time = "2024-08-02T17:46:17.837Z" }, - { url = "https://files.pythonhosted.org/packages/a8/69/a000fc3736f89d1bdc7f4a879f8aaf516fb03613bb51a0154070383d95d9/black-24.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:72901b4913cbac8972ad911dc4098d5753704d1f3c56e44ae8dce99eecb0e3af", size = 1427503, upload-time = "2024-08-02T17:46:22.654Z" }, - { url = "https://files.pythonhosted.org/packages/a2/a8/05fb14195cfef32b7c8d4585a44b7499c2a4b205e1662c427b941ed87054/black-24.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:7c046c1d1eeb7aea9335da62472481d3bbf3fd986e093cffd35f4385c94ae368", size = 1646132, upload-time = "2024-08-02T17:49:52.843Z" }, - { url = "https://files.pythonhosted.org/packages/41/77/8d9ce42673e5cb9988f6df73c1c5c1d4e9e788053cccd7f5fb14ef100982/black-24.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:649f6d84ccbae73ab767e206772cc2d7a393a001070a4c814a546afd0d423aed", size = 1448665, upload-time = "2024-08-02T17:47:54.479Z" }, - { url = "https://files.pythonhosted.org/packages/cc/94/eff1ddad2ce1d3cc26c162b3693043c6b6b575f538f602f26fe846dfdc75/black-24.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b59b250fdba5f9a9cd9d0ece6e6d993d91ce877d121d161e4698af3eb9c1018", size = 1762458, upload-time = "2024-08-02T17:46:19.384Z" }, - { url = "https://files.pythonhosted.org/packages/28/ea/18b8d86a9ca19a6942e4e16759b2fa5fc02bbc0eb33c1b866fcd387640ab/black-24.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:6e55d30d44bed36593c3163b9bc63bf58b3b30e4611e4d88a0c3c239930ed5b2", size = 1436109, upload-time = "2024-08-02T17:46:52.97Z" }, - { url = "https://files.pythonhosted.org/packages/9f/d4/ae03761ddecc1a37d7e743b89cccbcf3317479ff4b88cfd8818079f890d0/black-24.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:505289f17ceda596658ae81b61ebbe2d9b25aa78067035184ed0a9d855d18afd", size = 1617322, upload-time = "2024-08-02T17:51:20.203Z" }, - { url = "https://files.pythonhosted.org/packages/14/4b/4dfe67eed7f9b1ddca2ec8e4418ea74f0d1dc84d36ea874d618ffa1af7d4/black-24.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b19c9ad992c7883ad84c9b22aaa73562a16b819c1d8db7a1a1a49fb7ec13c7d2", size = 1442108, upload-time = "2024-08-02T17:50:40.824Z" }, - { url = "https://files.pythonhosted.org/packages/97/14/95b3f91f857034686cae0e73006b8391d76a8142d339b42970eaaf0416ea/black-24.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1f13f7f386f86f8121d76599114bb8c17b69d962137fc70efe56137727c7047e", size = 1745786, upload-time = "2024-08-02T17:46:02.939Z" }, - { url = "https://files.pythonhosted.org/packages/95/54/68b8883c8aa258a6dde958cd5bdfada8382bec47c5162f4a01e66d839af1/black-24.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:f490dbd59680d809ca31efdae20e634f3fae27fba3ce0ba3208333b713bc3920", size = 1426754, upload-time = "2024-08-02T17:46:38.603Z" }, - { url = "https://files.pythonhosted.org/packages/13/b2/b3f24fdbb46f0e7ef6238e131f13572ee8279b70f237f221dd168a9dba1a/black-24.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:eab4dd44ce80dea27dc69db40dab62d4ca96112f87996bca68cd75639aeb2e4c", size = 1631706, upload-time = "2024-08-02T17:49:57.606Z" }, - { url = "https://files.pythonhosted.org/packages/d9/35/31010981e4a05202a84a3116423970fd1a59d2eda4ac0b3570fbb7029ddc/black-24.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3c4285573d4897a7610054af5a890bde7c65cb466040c5f0c8b732812d7f0e5e", size = 1457429, upload-time = "2024-08-02T17:49:12.764Z" }, - { url = "https://files.pythonhosted.org/packages/27/25/3f706b4f044dd569a20a4835c3b733dedea38d83d2ee0beb8178a6d44945/black-24.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9e84e33b37be070ba135176c123ae52a51f82306def9f7d063ee302ecab2cf47", size = 1756488, upload-time = "2024-08-02T17:46:08.067Z" }, - { url = "https://files.pythonhosted.org/packages/63/72/79375cd8277cbf1c5670914e6bd4c1b15dea2c8f8e906dc21c448d0535f0/black-24.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:73bbf84ed136e45d451a260c6b73ed674652f90a2b3211d6a35e78054563a9bb", size = 1417721, upload-time = "2024-08-02T17:46:42.637Z" }, - { url = "https://files.pythonhosted.org/packages/27/1e/83fa8a787180e1632c3d831f7e58994d7aaf23a0961320d21e84f922f919/black-24.8.0-py3-none-any.whl", hash = "sha256:972085c618ee94f402da1af548a4f218c754ea7e5dc70acb168bfaca4c2542ed", size = 206504, upload-time = "2024-08-02T17:43:15.747Z" }, -] - [[package]] name = "black" version = "24.10.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", - "python_full_version == '3.9.*'", -] dependencies = [ - { name = "click", version = "8.1.8", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.9.*'" }, + { name = "click", version = "8.1.8", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, { name = "click", version = "8.3.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, - { name = "mypy-extensions", marker = "python_full_version >= '3.9'" }, - { name = "packaging", marker = "python_full_version >= '3.9'" }, - { name = "pathspec", marker = "python_full_version >= '3.9'" }, - { name = "platformdirs", version = "4.4.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.9.*'" }, + { name = "mypy-extensions" }, + { name = "packaging" }, + { name = "pathspec" }, + { name = "platformdirs", version = "4.4.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, { name = "platformdirs", version = "4.5.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, - { name = "tomli", marker = "python_full_version >= '3.9' and python_full_version < '3.11'" }, - { name = "typing-extensions", version = "4.15.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9' and python_full_version < '3.11'" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/d8/0d/cc2fb42b8c50d80143221515dd7e4766995bd07c56c9a3ed30baf080b6dc/black-24.10.0.tar.gz", hash = "sha256:846ea64c97afe3bc677b761787993be4991810ecc7a4a937816dd6bddedc4875", size = 645813, upload-time = "2024-10-07T19:20:50.361Z" } wheels = [ @@ -141,8 +76,7 @@ name = "click" version = "8.1.8" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version == '3.9.*'", - "python_full_version < '3.9'", + "python_full_version < '3.10'", ] dependencies = [ { name = "colorama", marker = "python_full_version < '3.10' and sys_platform == 'win32'" }, @@ -176,35 +110,14 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, ] -[[package]] -name = "flake8" -version = "7.1.2" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.9'", -] -dependencies = [ - { name = "mccabe", marker = "python_full_version < '3.9'" }, - { name = "pycodestyle", version = "2.12.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, - { name = "pyflakes", version = "3.2.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/58/16/3f2a0bb700ad65ac9663262905a025917c020a3f92f014d2ba8964b4602c/flake8-7.1.2.tar.gz", hash = "sha256:c586ffd0b41540951ae41af572e6790dbd49fc12b3aa2541685d253d9bd504bd", size = 48119, upload-time = "2025-02-16T18:45:44.296Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/35/f8/08d37b2cd89da306e3520bd27f8a85692122b42b56c0c2c3784ff09c022f/flake8-7.1.2-py2.py3-none-any.whl", hash = "sha256:1cbc62e65536f65e6d754dfe6f1bada7f5cf392d6f5db3c2b85892466c3e7c1a", size = 57745, upload-time = "2025-02-16T18:45:42.351Z" }, -] - [[package]] name = "flake8" version = "7.3.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", - "python_full_version == '3.9.*'", -] dependencies = [ - { name = "mccabe", marker = "python_full_version >= '3.9'" }, - { name = "pycodestyle", version = "2.14.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" }, - { name = "pyflakes", version = "3.4.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" }, + { name = "mccabe" }, + { name = "pycodestyle" }, + { name = "pyflakes" }, ] sdist = { url = "https://files.pythonhosted.org/packages/9b/af/fbfe3c4b5a657d79e5c47a2827a362f9e1b763336a52f926126aa6dc7123/flake8-7.3.0.tar.gz", hash = "sha256:fe044858146b9fc69b551a4b490d69cf960fcb78ad1edcb84e7fbb1b4a8e3872", size = 48326, upload-time = "2025-06-20T19:31:35.838Z" } wheels = [ @@ -216,13 +129,10 @@ name = "fluent-runtime" version = "0.4.0" source = { editable = "fluent.runtime" } dependencies = [ - { name = "attrs", version = "25.3.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, - { name = "attrs", version = "25.4.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" }, + { name = "attrs" }, { name = "babel" }, { name = "fluent-syntax" }, { name = "pytz" }, - { name = "typing-extensions", version = "4.13.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, - { name = "typing-extensions", version = "4.15.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" }, ] [package.metadata] @@ -231,20 +141,12 @@ requires-dist = [ { name = "babel" }, { name = "fluent-syntax", editable = "fluent.syntax" }, { name = "pytz" }, - { name = "typing-extensions", specifier = ">=3.7,<5" }, ] [[package]] name = "fluent-syntax" version = "0.19.0" source = { editable = "fluent.syntax" } -dependencies = [ - { name = "typing-extensions", version = "4.13.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, - { name = "typing-extensions", version = "4.15.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" }, -] - -[package.metadata] -requires-dist = [{ name = "typing-extensions", specifier = ">=3.7,<5" }] [[package]] name = "isort" @@ -347,73 +249,16 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/27/1a/1f68f9ba0c207934b35b86a8ca3aad8395a3d6dd7921c0686e23853ff5a9/mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e", size = 7350, upload-time = "2022-01-24T01:14:49.62Z" }, ] -[[package]] -name = "mypy" -version = "1.14.1" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.9'", -] -dependencies = [ - { name = "mypy-extensions", marker = "python_full_version < '3.9'" }, - { name = "tomli", marker = "python_full_version < '3.9'" }, - { name = "typing-extensions", version = "4.13.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/b9/eb/2c92d8ea1e684440f54fa49ac5d9a5f19967b7b472a281f419e69a8d228e/mypy-1.14.1.tar.gz", hash = "sha256:7ec88144fe9b510e8475ec2f5f251992690fcf89ccb4500b214b4226abcd32d6", size = 3216051, upload-time = "2024-12-30T16:39:07.335Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9b/7a/87ae2adb31d68402da6da1e5f30c07ea6063e9f09b5e7cfc9dfa44075e74/mypy-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:52686e37cf13d559f668aa398dd7ddf1f92c5d613e4f8cb262be2fb4fedb0fcb", size = 11211002, upload-time = "2024-12-30T16:37:22.435Z" }, - { url = "https://files.pythonhosted.org/packages/e1/23/eada4c38608b444618a132be0d199b280049ded278b24cbb9d3fc59658e4/mypy-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1fb545ca340537d4b45d3eecdb3def05e913299ca72c290326be19b3804b39c0", size = 10358400, upload-time = "2024-12-30T16:37:53.526Z" }, - { url = "https://files.pythonhosted.org/packages/43/c9/d6785c6f66241c62fd2992b05057f404237deaad1566545e9f144ced07f5/mypy-1.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:90716d8b2d1f4cd503309788e51366f07c56635a3309b0f6a32547eaaa36a64d", size = 12095172, upload-time = "2024-12-30T16:37:50.332Z" }, - { url = "https://files.pythonhosted.org/packages/c3/62/daa7e787770c83c52ce2aaf1a111eae5893de9e004743f51bfcad9e487ec/mypy-1.14.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2ae753f5c9fef278bcf12e1a564351764f2a6da579d4a81347e1d5a15819997b", size = 12828732, upload-time = "2024-12-30T16:37:29.96Z" }, - { url = "https://files.pythonhosted.org/packages/1b/a2/5fb18318a3637f29f16f4e41340b795da14f4751ef4f51c99ff39ab62e52/mypy-1.14.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e0fe0f5feaafcb04505bcf439e991c6d8f1bf8b15f12b05feeed96e9e7bf1427", size = 13012197, upload-time = "2024-12-30T16:38:05.037Z" }, - { url = "https://files.pythonhosted.org/packages/28/99/e153ce39105d164b5f02c06c35c7ba958aaff50a2babba7d080988b03fe7/mypy-1.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:7d54bd85b925e501c555a3227f3ec0cfc54ee8b6930bd6141ec872d1c572f81f", size = 9780836, upload-time = "2024-12-30T16:37:19.726Z" }, - { url = "https://files.pythonhosted.org/packages/da/11/a9422850fd506edbcdc7f6090682ecceaf1f87b9dd847f9df79942da8506/mypy-1.14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f995e511de847791c3b11ed90084a7a0aafdc074ab88c5a9711622fe4751138c", size = 11120432, upload-time = "2024-12-30T16:37:11.533Z" }, - { url = "https://files.pythonhosted.org/packages/b6/9e/47e450fd39078d9c02d620545b2cb37993a8a8bdf7db3652ace2f80521ca/mypy-1.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d64169ec3b8461311f8ce2fd2eb5d33e2d0f2c7b49116259c51d0d96edee48d1", size = 10279515, upload-time = "2024-12-30T16:37:40.724Z" }, - { url = "https://files.pythonhosted.org/packages/01/b5/6c8d33bd0f851a7692a8bfe4ee75eb82b6983a3cf39e5e32a5d2a723f0c1/mypy-1.14.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ba24549de7b89b6381b91fbc068d798192b1b5201987070319889e93038967a8", size = 12025791, upload-time = "2024-12-30T16:36:58.73Z" }, - { url = "https://files.pythonhosted.org/packages/f0/4c/e10e2c46ea37cab5c471d0ddaaa9a434dc1d28650078ac1b56c2d7b9b2e4/mypy-1.14.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:183cf0a45457d28ff9d758730cd0210419ac27d4d3f285beda038c9083363b1f", size = 12749203, upload-time = "2024-12-30T16:37:03.741Z" }, - { url = "https://files.pythonhosted.org/packages/88/55/beacb0c69beab2153a0f57671ec07861d27d735a0faff135a494cd4f5020/mypy-1.14.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f2a0ecc86378f45347f586e4163d1769dd81c5a223d577fe351f26b179e148b1", size = 12885900, upload-time = "2024-12-30T16:37:57.948Z" }, - { url = "https://files.pythonhosted.org/packages/a2/75/8c93ff7f315c4d086a2dfcde02f713004357d70a163eddb6c56a6a5eff40/mypy-1.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:ad3301ebebec9e8ee7135d8e3109ca76c23752bac1e717bc84cd3836b4bf3eae", size = 9777869, upload-time = "2024-12-30T16:37:33.428Z" }, - { url = "https://files.pythonhosted.org/packages/43/1b/b38c079609bb4627905b74fc6a49849835acf68547ac33d8ceb707de5f52/mypy-1.14.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:30ff5ef8519bbc2e18b3b54521ec319513a26f1bba19a7582e7b1f58a6e69f14", size = 11266668, upload-time = "2024-12-30T16:38:02.211Z" }, - { url = "https://files.pythonhosted.org/packages/6b/75/2ed0d2964c1ffc9971c729f7a544e9cd34b2cdabbe2d11afd148d7838aa2/mypy-1.14.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:cb9f255c18052343c70234907e2e532bc7e55a62565d64536dbc7706a20b78b9", size = 10254060, upload-time = "2024-12-30T16:37:46.131Z" }, - { url = "https://files.pythonhosted.org/packages/a1/5f/7b8051552d4da3c51bbe8fcafffd76a6823779101a2b198d80886cd8f08e/mypy-1.14.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b4e3413e0bddea671012b063e27591b953d653209e7a4fa5e48759cda77ca11", size = 11933167, upload-time = "2024-12-30T16:37:43.534Z" }, - { url = "https://files.pythonhosted.org/packages/04/90/f53971d3ac39d8b68bbaab9a4c6c58c8caa4d5fd3d587d16f5927eeeabe1/mypy-1.14.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:553c293b1fbdebb6c3c4030589dab9fafb6dfa768995a453d8a5d3b23784af2e", size = 12864341, upload-time = "2024-12-30T16:37:36.249Z" }, - { url = "https://files.pythonhosted.org/packages/03/d2/8bc0aeaaf2e88c977db41583559319f1821c069e943ada2701e86d0430b7/mypy-1.14.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fad79bfe3b65fe6a1efaed97b445c3d37f7be9fdc348bdb2d7cac75579607c89", size = 12972991, upload-time = "2024-12-30T16:37:06.743Z" }, - { url = "https://files.pythonhosted.org/packages/6f/17/07815114b903b49b0f2cf7499f1c130e5aa459411596668267535fe9243c/mypy-1.14.1-cp312-cp312-win_amd64.whl", hash = "sha256:8fa2220e54d2946e94ab6dbb3ba0a992795bd68b16dc852db33028df2b00191b", size = 9879016, upload-time = "2024-12-30T16:37:15.02Z" }, - { url = "https://files.pythonhosted.org/packages/9e/15/bb6a686901f59222275ab228453de741185f9d54fecbaacec041679496c6/mypy-1.14.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:92c3ed5afb06c3a8e188cb5da4984cab9ec9a77ba956ee419c68a388b4595255", size = 11252097, upload-time = "2024-12-30T16:37:25.144Z" }, - { url = "https://files.pythonhosted.org/packages/f8/b3/8b0f74dfd072c802b7fa368829defdf3ee1566ba74c32a2cb2403f68024c/mypy-1.14.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:dbec574648b3e25f43d23577309b16534431db4ddc09fda50841f1e34e64ed34", size = 10239728, upload-time = "2024-12-30T16:38:08.634Z" }, - { url = "https://files.pythonhosted.org/packages/c5/9b/4fd95ab20c52bb5b8c03cc49169be5905d931de17edfe4d9d2986800b52e/mypy-1.14.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8c6d94b16d62eb3e947281aa7347d78236688e21081f11de976376cf010eb31a", size = 11924965, upload-time = "2024-12-30T16:38:12.132Z" }, - { url = "https://files.pythonhosted.org/packages/56/9d/4a236b9c57f5d8f08ed346914b3f091a62dd7e19336b2b2a0d85485f82ff/mypy-1.14.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d4b19b03fdf54f3c5b2fa474c56b4c13c9dbfb9a2db4370ede7ec11a2c5927d9", size = 12867660, upload-time = "2024-12-30T16:38:17.342Z" }, - { url = "https://files.pythonhosted.org/packages/40/88/a61a5497e2f68d9027de2bb139c7bb9abaeb1be1584649fa9d807f80a338/mypy-1.14.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0c911fde686394753fff899c409fd4e16e9b294c24bfd5e1ea4675deae1ac6fd", size = 12969198, upload-time = "2024-12-30T16:38:32.839Z" }, - { url = "https://files.pythonhosted.org/packages/54/da/3d6fc5d92d324701b0c23fb413c853892bfe0e1dbe06c9138037d459756b/mypy-1.14.1-cp313-cp313-win_amd64.whl", hash = "sha256:8b21525cb51671219f5307be85f7e646a153e5acc656e5cebf64bfa076c50107", size = 9885276, upload-time = "2024-12-30T16:38:20.828Z" }, - { url = "https://files.pythonhosted.org/packages/39/02/1817328c1372be57c16148ce7d2bfcfa4a796bedaed897381b1aad9b267c/mypy-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7084fb8f1128c76cd9cf68fe5971b37072598e7c31b2f9f95586b65c741a9d31", size = 11143050, upload-time = "2024-12-30T16:38:29.743Z" }, - { url = "https://files.pythonhosted.org/packages/b9/07/99db9a95ece5e58eee1dd87ca456a7e7b5ced6798fd78182c59c35a7587b/mypy-1.14.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8f845a00b4f420f693f870eaee5f3e2692fa84cc8514496114649cfa8fd5e2c6", size = 10321087, upload-time = "2024-12-30T16:38:14.739Z" }, - { url = "https://files.pythonhosted.org/packages/9a/eb/85ea6086227b84bce79b3baf7f465b4732e0785830726ce4a51528173b71/mypy-1.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:44bf464499f0e3a2d14d58b54674dee25c031703b2ffc35064bd0df2e0fac319", size = 12066766, upload-time = "2024-12-30T16:38:47.038Z" }, - { url = "https://files.pythonhosted.org/packages/4b/bb/f01bebf76811475d66359c259eabe40766d2f8ac8b8250d4e224bb6df379/mypy-1.14.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c99f27732c0b7dc847adb21c9d47ce57eb48fa33a17bc6d7d5c5e9f9e7ae5bac", size = 12787111, upload-time = "2024-12-30T16:39:02.444Z" }, - { url = "https://files.pythonhosted.org/packages/2f/c9/84837ff891edcb6dcc3c27d85ea52aab0c4a34740ff5f0ccc0eb87c56139/mypy-1.14.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:bce23c7377b43602baa0bd22ea3265c49b9ff0b76eb315d6c34721af4cdf1d9b", size = 12974331, upload-time = "2024-12-30T16:38:23.849Z" }, - { url = "https://files.pythonhosted.org/packages/84/5f/901e18464e6a13f8949b4909535be3fa7f823291b8ab4e4b36cfe57d6769/mypy-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:8edc07eeade7ebc771ff9cf6b211b9a7d93687ff892150cb5692e4f4272b0837", size = 9763210, upload-time = "2024-12-30T16:38:36.299Z" }, - { url = "https://files.pythonhosted.org/packages/ca/1f/186d133ae2514633f8558e78cd658070ba686c0e9275c5a5c24a1e1f0d67/mypy-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3888a1816d69f7ab92092f785a462944b3ca16d7c470d564165fe703b0970c35", size = 11200493, upload-time = "2024-12-30T16:38:26.935Z" }, - { url = "https://files.pythonhosted.org/packages/af/fc/4842485d034e38a4646cccd1369f6b1ccd7bc86989c52770d75d719a9941/mypy-1.14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:46c756a444117c43ee984bd055db99e498bc613a70bbbc120272bd13ca579fbc", size = 10357702, upload-time = "2024-12-30T16:38:50.623Z" }, - { url = "https://files.pythonhosted.org/packages/b4/e6/457b83f2d701e23869cfec013a48a12638f75b9d37612a9ddf99072c1051/mypy-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:27fc248022907e72abfd8e22ab1f10e903915ff69961174784a3900a8cba9ad9", size = 12091104, upload-time = "2024-12-30T16:38:53.735Z" }, - { url = "https://files.pythonhosted.org/packages/f1/bf/76a569158db678fee59f4fd30b8e7a0d75bcbaeef49edd882a0d63af6d66/mypy-1.14.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:499d6a72fb7e5de92218db961f1a66d5f11783f9ae549d214617edab5d4dbdbb", size = 12830167, upload-time = "2024-12-30T16:38:56.437Z" }, - { url = "https://files.pythonhosted.org/packages/43/bc/0bc6b694b3103de9fed61867f1c8bd33336b913d16831431e7cb48ef1c92/mypy-1.14.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:57961db9795eb566dc1d1b4e9139ebc4c6b0cb6e7254ecde69d1552bf7613f60", size = 13013834, upload-time = "2024-12-30T16:38:59.204Z" }, - { url = "https://files.pythonhosted.org/packages/b0/79/5f5ec47849b6df1e6943d5fd8e6632fbfc04b4fd4acfa5a5a9535d11b4e2/mypy-1.14.1-cp39-cp39-win_amd64.whl", hash = "sha256:07ba89fdcc9451f2ebb02853deb6aaaa3d2239a236669a63ab3801bbf923ef5c", size = 9781231, upload-time = "2024-12-30T16:39:05.124Z" }, - { url = "https://files.pythonhosted.org/packages/a0/b5/32dd67b69a16d088e533962e5044e51004176a9952419de0370cdaead0f8/mypy-1.14.1-py3-none-any.whl", hash = "sha256:b66a60cc4073aeb8ae00057f9c1f64d49e90f918fbcef9a977eb121da8b8f1d1", size = 2752905, upload-time = "2024-12-30T16:38:42.021Z" }, -] - [[package]] name = "mypy" version = "1.19.1" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", - "python_full_version == '3.9.*'", -] dependencies = [ - { name = "librt", marker = "python_full_version >= '3.9' and platform_python_implementation != 'PyPy'" }, - { name = "mypy-extensions", marker = "python_full_version >= '3.9'" }, - { name = "pathspec", marker = "python_full_version >= '3.9'" }, - { name = "tomli", marker = "python_full_version >= '3.9' and python_full_version < '3.11'" }, - { name = "typing-extensions", version = "4.15.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" }, + { name = "librt", marker = "platform_python_implementation != 'PyPy'" }, + { name = "mypy-extensions" }, + { name = "pathspec" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, + { name = "typing-extensions" }, ] sdist = { url = "https://files.pythonhosted.org/packages/f5/db/4efed9504bc01309ab9c2da7e352cc223569f05478012b5d9ece38fd44d2/mypy-1.19.1.tar.gz", hash = "sha256:19d88bb05303fe63f71dd2c6270daca27cb9401c4ca8255fe50d1d920e0eb9ba", size = 3582404, upload-time = "2025-12-15T05:03:48.42Z" } wheels = [ @@ -483,24 +328,12 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", size = 31191, upload-time = "2023-12-10T22:30:43.14Z" }, ] -[[package]] -name = "platformdirs" -version = "4.3.6" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.9'", -] -sdist = { url = "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907", size = 21302, upload-time = "2024-09-17T19:06:50.688Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/3c/a6/bc1012356d8ece4d66dd75c4b9fc6c1f6650ddd5991e421177d9f8f671be/platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb", size = 18439, upload-time = "2024-09-17T19:06:49.212Z" }, -] - [[package]] name = "platformdirs" version = "4.4.0" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version == '3.9.*'", + "python_full_version < '3.10'", ] sdist = { url = "https://files.pythonhosted.org/packages/23/e8/21db9c9987b0e728855bd57bff6984f67952bea55d6f75e055c46b5383e8/platformdirs-4.4.0.tar.gz", hash = "sha256:ca753cf4d81dc309bc67b0ea38fd15dc97bc30ce419a7f58d13eb3bf14c4febf", size = 21634, upload-time = "2025-08-26T14:32:04.268Z" } wheels = [ @@ -519,51 +352,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/cb/28/3bfe2fa5a7b9c46fe7e13c97bda14c895fb10fa2ebf1d0abb90e0cea7ee1/platformdirs-4.5.1-py3-none-any.whl", hash = "sha256:d03afa3963c806a9bed9d5125c8f4cb2fdaf74a55ab60e5d59b3fde758104d31", size = 18731, upload-time = "2025-12-05T13:52:56.823Z" }, ] -[[package]] -name = "pycodestyle" -version = "2.12.1" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.9'", -] -sdist = { url = "https://files.pythonhosted.org/packages/43/aa/210b2c9aedd8c1cbeea31a50e42050ad56187754b34eb214c46709445801/pycodestyle-2.12.1.tar.gz", hash = "sha256:6838eae08bbce4f6accd5d5572075c63626a15ee3e6f842df996bf62f6d73521", size = 39232, upload-time = "2024-08-04T20:26:54.576Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/3a/d8/a211b3f85e99a0daa2ddec96c949cac6824bd305b040571b82a03dd62636/pycodestyle-2.12.1-py2.py3-none-any.whl", hash = "sha256:46f0fb92069a7c28ab7bb558f05bfc0110dac69a0cd23c61ea0040283a9d78b3", size = 31284, upload-time = "2024-08-04T20:26:53.173Z" }, -] - [[package]] name = "pycodestyle" version = "2.14.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", - "python_full_version == '3.9.*'", -] sdist = { url = "https://files.pythonhosted.org/packages/11/e0/abfd2a0d2efe47670df87f3e3a0e2edda42f055053c85361f19c0e2c1ca8/pycodestyle-2.14.0.tar.gz", hash = "sha256:c4b5b517d278089ff9d0abdec919cd97262a3367449ea1c8b49b91529167b783", size = 39472, upload-time = "2025-06-20T18:49:48.75Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/d7/27/a58ddaf8c588a3ef080db9d0b7e0b97215cee3a45df74f3a94dbbf5c893a/pycodestyle-2.14.0-py2.py3-none-any.whl", hash = "sha256:dd6bf7cb4ee77f8e016f9c8e74a35ddd9f67e1d5fd4184d86c3b98e07099f42d", size = 31594, upload-time = "2025-06-20T18:49:47.491Z" }, ] -[[package]] -name = "pyflakes" -version = "3.2.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.9'", -] -sdist = { url = "https://files.pythonhosted.org/packages/57/f9/669d8c9c86613c9d568757c7f5824bd3197d7b1c6c27553bc5618a27cce2/pyflakes-3.2.0.tar.gz", hash = "sha256:1c61603ff154621fb2a9172037d84dca3500def8c8b630657d1701f026f8af3f", size = 63788, upload-time = "2024-01-05T00:28:47.703Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d4/d7/f1b7db88d8e4417c5d47adad627a93547f44bdc9028372dbd2313f34a855/pyflakes-3.2.0-py2.py3-none-any.whl", hash = "sha256:84b5be138a2dfbb40689ca07e2152deb896a65c3a3e24c251c5c62489568074a", size = 62725, upload-time = "2024-01-05T00:28:45.903Z" }, -] - [[package]] name = "pyflakes" version = "3.4.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", - "python_full_version == '3.9.*'", -] sdist = { url = "https://files.pythonhosted.org/packages/45/dc/fd034dc20b4b264b3d015808458391acbf9df40b1e54750ef175d39180b1/pyflakes-3.4.0.tar.gz", hash = "sha256:b24f96fafb7d2ab0ec5075b7350b3d2d2218eab42003821c06344973d3ea2f58", size = 64669, upload-time = "2025-06-20T18:45:27.834Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/c2/2f/81d580a0fb83baeb066698975cb14a618bdbed7720678566f1b046a95fe8/pyflakes-3.4.0-py2.py3-none-any.whl", hash = "sha256:f742a7dbd0d9cb9ea41e9a24a918996e8170c799fa528688d40dd582c8265f4f", size = 63551, upload-time = "2025-06-20T18:45:26.937Z" }, @@ -574,17 +375,13 @@ name = "python-fluent" version = "0" source = { virtual = "." } dependencies = [ - { name = "black", version = "24.8.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, - { name = "black", version = "24.10.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" }, - { name = "flake8", version = "7.1.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, - { name = "flake8", version = "7.3.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" }, + { name = "black" }, + { name = "flake8" }, { name = "fluent-syntax" }, { name = "isort" }, - { name = "mypy", version = "1.14.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, - { name = "mypy", version = "1.19.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" }, + { name = "mypy" }, { name = "types-babel" }, - { name = "types-pytz", version = "2024.2.0.20241221", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, - { name = "types-pytz", version = "2025.2.0.20251108", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" }, + { name = "types-pytz" }, ] [package.metadata] @@ -661,86 +458,36 @@ name = "types-babel" version = "2.11.0.15" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "types-pytz", version = "2024.2.0.20241221", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, - { name = "types-pytz", version = "2025.2.0.20251108", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" }, - { name = "types-setuptools", version = "75.8.0.20250110", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.9'" }, - { name = "types-setuptools", version = "80.9.0.20251223", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" }, + { name = "types-pytz" }, + { name = "types-setuptools" }, ] sdist = { url = "https://files.pythonhosted.org/packages/64/b5/b18d2dd9375515126069616096470fd9efd27434abac9e8d601e71f61b12/types-babel-2.11.0.15.tar.gz", hash = "sha256:282c184c8c9d81e8269212c1b8fa0d39ee88fb8bc43be47980412781c9c85f7e", size = 14392, upload-time = "2023-07-20T15:21:10.686Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/d7/6a/56538e54ca538552a1b83e5f3f05ba23668870276a9342df1252e4e07f73/types_babel-2.11.0.15-py3-none-any.whl", hash = "sha256:d0579f2e8adeaef3fbe2eb63e5a2ecf01767fc018e5f3f36a3c9d8b723bd62c7", size = 18442, upload-time = "2023-07-20T15:21:08.221Z" }, ] -[[package]] -name = "types-pytz" -version = "2024.2.0.20241221" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.9'", -] -sdist = { url = "https://files.pythonhosted.org/packages/54/26/516311b02b5a215e721155fb65db8a965d061372e388d6125ebce8d674b0/types_pytz-2024.2.0.20241221.tar.gz", hash = "sha256:06d7cde9613e9f7504766a0554a270c369434b50e00975b3a4a0f6eed0f2c1a9", size = 10213, upload-time = "2024-12-21T02:40:48.654Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/74/db/c92ca6920cccd9c2998b013601542e2ac5e59bc805bcff94c94ad254b7df/types_pytz-2024.2.0.20241221-py3-none-any.whl", hash = "sha256:8fc03195329c43637ed4f593663df721fef919b60a969066e22606edf0b53ad5", size = 10008, upload-time = "2024-12-21T02:40:47.047Z" }, -] - [[package]] name = "types-pytz" version = "2025.2.0.20251108" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", - "python_full_version == '3.9.*'", -] sdist = { url = "https://files.pythonhosted.org/packages/40/ff/c047ddc68c803b46470a357454ef76f4acd8c1088f5cc4891cdd909bfcf6/types_pytz-2025.2.0.20251108.tar.gz", hash = "sha256:fca87917836ae843f07129567b74c1929f1870610681b4c92cb86a3df5817bdb", size = 10961, upload-time = "2025-11-08T02:55:57.001Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/e7/c1/56ef16bf5dcd255155cc736d276efa6ae0a5c26fd685e28f0412a4013c01/types_pytz-2025.2.0.20251108-py3-none-any.whl", hash = "sha256:0f1c9792cab4eb0e46c52f8845c8f77cf1e313cb3d68bf826aa867fe4717d91c", size = 10116, upload-time = "2025-11-08T02:55:56.194Z" }, ] -[[package]] -name = "types-setuptools" -version = "75.8.0.20250110" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.9'", -] -sdist = { url = "https://files.pythonhosted.org/packages/f7/42/5713e90d4f9683f2301d900f33e4fc2405ad8ac224dda30f6cb7f4cd215b/types_setuptools-75.8.0.20250110.tar.gz", hash = "sha256:96f7ec8bbd6e0a54ea180d66ad68ad7a1d7954e7281a710ea2de75e355545271", size = 48185, upload-time = "2025-01-10T02:45:52.085Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/cf/a3/dbfd106751b11c728cec21cc62cbfe7ff7391b935c4b6e8f0bdc2e6fd541/types_setuptools-75.8.0.20250110-py3-none-any.whl", hash = "sha256:a9f12980bbf9bcdc23ecd80755789085bad6bfce4060c2275bc2b4ca9f2bc480", size = 71521, upload-time = "2025-01-10T02:45:49.873Z" }, -] - [[package]] name = "types-setuptools" version = "80.9.0.20251223" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", - "python_full_version == '3.9.*'", -] sdist = { url = "https://files.pythonhosted.org/packages/00/07/d1b605230730990de20477150191d6dccf6aecc037da94c9960a5d563bc8/types_setuptools-80.9.0.20251223.tar.gz", hash = "sha256:d3411059ae2f5f03985217d86ac6084efea2c9e9cacd5f0869ef950f308169b2", size = 42420, upload-time = "2025-12-23T03:18:26.752Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/78/5c/b8877da94012dbc6643e4eeca22bca9b99b295be05d161f8a403ae9387c0/types_setuptools-80.9.0.20251223-py3-none-any.whl", hash = "sha256:1b36db79d724c2287d83dc052cf887b47c0da6a2fff044378be0b019545f56e6", size = 64318, upload-time = "2025-12-23T03:18:25.868Z" }, ] -[[package]] -name = "typing-extensions" -version = "4.13.2" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.9'", -] -sdist = { url = "https://files.pythonhosted.org/packages/f6/37/23083fcd6e35492953e8d2aaaa68b860eb422b34627b13f2ce3eb6106061/typing_extensions-4.13.2.tar.gz", hash = "sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef", size = 106967, upload-time = "2025-04-10T14:19:05.416Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/8b/54/b1ae86c0973cc6f0210b53d508ca3641fb6d0c56823f288d108bc7ab3cc8/typing_extensions-4.13.2-py3-none-any.whl", hash = "sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c", size = 45806, upload-time = "2025-04-10T14:19:03.967Z" }, -] - [[package]] name = "typing-extensions" version = "4.15.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.10'", - "python_full_version == '3.9.*'", -] sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" },