diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 75e530a..58842c8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Odoo Connect", - "image": "mcr.microsoft.com/vscode/devcontainers/python:0-3", + "image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.7", "customizations": { "vscode": { diff --git a/odoo_connect/format.py b/odoo_connect/format.py index a1ec2d0..942a95c 100644 --- a/odoo_connect/format.py +++ b/odoo_connect/format.py @@ -2,7 +2,7 @@ from collections import defaultdict from contextvars import ContextVar from datetime import date, datetime, timezone -from typing import Any, Callable, Dict, Optional, Union, cast +from typing import Any, Callable, Dict, Optional, Tuple, Union, cast from .odoo_rpc import OdooModel @@ -113,7 +113,7 @@ def format_binary(v: Union[bytes, str]) -> str: """Transform type to tuple(formatter, decoder)""" -_FORMAT_FUNCTIONS: dict[str, tuple[Callable, Callable]] = { +_FORMAT_FUNCTIONS: Dict[str, Tuple[Callable, Callable]] = { 'datetime': (format_datetime, decode_datetime), 'date': (format_date, decode_date), 'binary': (format_binary, decode_binary),