From fcfaec45fc6b019cfddc81e28131f3fc890e0ad5 Mon Sep 17 00:00:00 2001 From: Carson Lam Date: Wed, 19 Jul 2023 15:00:29 -0700 Subject: [PATCH 1/2] Postpone annotation evaluation on Callable: """ Attempt to load localized messages. @@ -51,7 +53,7 @@ def enable_module_localization_with_plurals( python_module_name: str, locale_dir: Optional[str] = None, enable_fallback: bool = True, - **kwargs + **kwargs, ) -> tuple[Callable, Callable]: """ Attempt to load localized messages. Supports localized strings which specify plurals. diff --git a/src/fmetools/paramparsing.py b/src/fmetools/paramparsing.py index 4fc0e96..ef26a3a 100644 --- a/src/fmetools/paramparsing.py +++ b/src/fmetools/paramparsing.py @@ -5,6 +5,8 @@ .. note:: This module can only be imported in FME 2023 or newer. """ +from __future__ import annotations + from typing import Any, Iterable, Optional, Union from fmetools.features import get_attributes, get_attributes_with_prefix diff --git a/src/fmetools/webservices.py b/src/fmetools/webservices.py index e5e03db..d160904 100644 --- a/src/fmetools/webservices.py +++ b/src/fmetools/webservices.py @@ -2,6 +2,8 @@ """ Helpers for working with FME Named Connections and FME Web Services. """ +from __future__ import annotations + from typing import Union import requests From c5237248f61e7f828223709deddc864195fd9663 Mon Sep 17 00:00:00 2001 From: Carson Lam Date: Wed, 19 Jul 2023 15:00:36 -0700 Subject: [PATCH 2/2] 0.7.1. --- CHANGES.md | 4 ++++ src/fmetools/__init__.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 7b56b52..d9ab378 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # fmetools changes +## 0.7.1 + +* Fix type annotations when using Python 3.8 and earlier. + ## 0.7.0 * Add HTML docs and expanded existing docstrings. diff --git a/src/fmetools/__init__.py b/src/fmetools/__init__.py index 8815b1c..6d311cf 100644 --- a/src/fmetools/__init__.py +++ b/src/fmetools/__init__.py @@ -1,6 +1,6 @@ # coding: utf-8 -__version__ = "0.7.0" +__version__ = "0.7.1" import gettext import os