diff --git a/featuremanagement/_featuremanagerbase.py b/featuremanagement/_featuremanagerbase.py index 8ec7ba1..99e15f0 100644 --- a/featuremanagement/_featuremanagerbase.py +++ b/featuremanagement/_featuremanagerbase.py @@ -8,7 +8,7 @@ import hashlib import logging from abc import ABC -from typing import List, Optional, Dict, Tuple, Any, Mapping, Callable, cast +from typing import List, Optional, Dict, Tuple, Any, Mapping, Callable from ._models import FeatureFlag, Variant, VariantAssignmentReason, TargetingContext, EvaluationEvent, VariantReference FEATURE_MANAGEMENT_KEY = "feature_management" @@ -293,4 +293,4 @@ def _get_feature_flags(self) -> List[Any]: feature_flags = feature_management.get(FEATURE_FLAG_KEY) if not feature_flags or not isinstance(feature_flags, list): return [] - return cast(List[Any], feature_flags) + return feature_flags diff --git a/pyproject.toml b/pyproject.toml index f50d406..70b9bb6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,9 @@ [tool.pytest.ini_options] +asyncio_mode = "auto" +addopts = "--import-mode=importlib" +markers = [ + "asyncio: mark a test as an asyncio test", +] pythonpath = [ "." ] @@ -58,21 +63,21 @@ Homepage = "https://github.com/microsoft/FeatureManagement-Python" Issues = "https://github.com/microsoft/FeatureManagement-Python/issues" [project.optional-dependencies] -AzureMonitor = ["opentelemetry-sdk~=1.20"] +AzureMonitor = ["opentelemetry-sdk~=1.44.0"] test = [ - "azure-monitor-opentelemetry < 2.0.0", + "azure-monitor-opentelemetry < 1.8.9", ] dev = [ - "pytest >= 7.0.0, < 10.0.0", - "pytest-cov >= 4.0.0, < 8.0.0", - "pytest-asyncio >= 0.21.0, < 2.0.0", - "black >= 23.0.0, < 27.0.0", - "pylint >= 3.0.0, < 5.0.0", - "mypy >= 1.0.0, < 2.0.0", - "sphinx >= 7.0.0, < 10.0.0", - "sphinx_rtd_theme >= 2.0.0, < 4.0.0", - "sphinx-toolbox >= 3.0.0, < 5.0.0", - "myst_parser >= 2.0.0, < 6.0.0", - "opentelemetry-api~=1.20", - "opentelemetry-sdk~=1.20", + "pytest >= 9.1.1, < 10.0.0", + "pytest-cov >= 7.1.0, < 8.0.0", + "pytest-asyncio >= 1.4.0, < 2.0.0", + "black >= 26.5.1, < 27.0.0", + "pylint >= 4.0.7, < 5.0.0", + "mypy >= 2.3.0, < 3.0.0", + "sphinx >= 8.1.3, < 10.0.0", + "sphinx_rtd_theme >= 3.1.0, < 4.0.0", + "sphinx-toolbox >= 4.3.0, < 5.0.0", + "myst_parser >= 4.0.1, < 6.0.0", + "opentelemetry-api~=1.44.0", + "opentelemetry-sdk~=1.44.0", ]