Skip to content

Commit

Permalink
fix: make code compatible with python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-fs committed Jul 8, 2024
1 parent 399c51a commit 967bf5a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/json_agg/aggregates.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""JSON themed aggregates for Django."""

from __future__ import annotations

import abc
from collections.abc import Callable
from functools import partial
from typing import Any

Expand Down Expand Up @@ -37,7 +38,7 @@ def _nested_db_converter(self, value, expression, connection, db_converter):
def _nested_to_python(self, value, expression, connection):
return self._convert_nested_value(value, self.nested_output_field.to_python)

def get_db_converters(self, connection: Any) -> list[Callable[..., Any]]:
def get_db_converters(self, connection: Any) -> list[callable[..., Any]]:
"""Override Django's BaseExpression method to handle nested output fields."""
converters = super().get_db_converters(connection)
if not self.nested_output_field:
Expand Down

0 comments on commit 967bf5a

Please sign in to comment.