@@ -473,7 +473,7 @@ async def get_boolean_value(
473
473
default_value : bool ,
474
474
evaluation_context : typing .Optional [EvaluationContext ] = None ,
475
475
flag_evaluation_options : typing .Optional [FlagEvaluationOptions ] = None ,
476
- ) -> typing . Coroutine [ typing . Any , typing . Any , bool ] :
476
+ ) -> bool :
477
477
details = await self .get_boolean_details (
478
478
flag_key ,
479
479
default_value ,
@@ -488,7 +488,7 @@ async def get_boolean_details(
488
488
default_value : bool ,
489
489
evaluation_context : typing .Optional [EvaluationContext ] = None ,
490
490
flag_evaluation_options : typing .Optional [FlagEvaluationOptions ] = None ,
491
- ) -> typing . Coroutine [ typing . Any , typing . Any , FlagEvaluationDetails [bool ] ]:
491
+ ) -> FlagEvaluationDetails [bool ]:
492
492
return await self .evaluate_flag_details (
493
493
FlagType .BOOLEAN ,
494
494
flag_key ,
@@ -503,7 +503,7 @@ async def get_string_value(
503
503
default_value : str ,
504
504
evaluation_context : typing .Optional [EvaluationContext ] = None ,
505
505
flag_evaluation_options : typing .Optional [FlagEvaluationOptions ] = None ,
506
- ) -> typing . Coroutine [ typing . Any , typing . Any , str ] :
506
+ ) -> str :
507
507
details = await self .get_string_details (
508
508
flag_key ,
509
509
default_value ,
@@ -518,7 +518,7 @@ async def get_string_details(
518
518
default_value : str ,
519
519
evaluation_context : typing .Optional [EvaluationContext ] = None ,
520
520
flag_evaluation_options : typing .Optional [FlagEvaluationOptions ] = None ,
521
- ) -> typing . Coroutine [ typing . Any , typing . Any , FlagEvaluationDetails [str ] ]:
521
+ ) -> FlagEvaluationDetails [str ]:
522
522
return await self .evaluate_flag_details (
523
523
FlagType .STRING ,
524
524
flag_key ,
@@ -533,7 +533,7 @@ async def get_integer_value(
533
533
default_value : int ,
534
534
evaluation_context : typing .Optional [EvaluationContext ] = None ,
535
535
flag_evaluation_options : typing .Optional [FlagEvaluationOptions ] = None ,
536
- ) -> typing . Coroutine [ typing . Any , typing . Any , int ] :
536
+ ) -> int :
537
537
details = await self .get_integer_details (
538
538
flag_key ,
539
539
default_value ,
@@ -548,7 +548,7 @@ async def get_integer_details(
548
548
default_value : int ,
549
549
evaluation_context : typing .Optional [EvaluationContext ] = None ,
550
550
flag_evaluation_options : typing .Optional [FlagEvaluationOptions ] = None ,
551
- ) -> typing . Coroutine [ typing . Any , typing . Any , FlagEvaluationDetails [int ] ]:
551
+ ) -> FlagEvaluationDetails [int ]:
552
552
return await self .evaluate_flag_details (
553
553
FlagType .INTEGER ,
554
554
flag_key ,
@@ -563,7 +563,7 @@ async def get_float_value(
563
563
default_value : float ,
564
564
evaluation_context : typing .Optional [EvaluationContext ] = None ,
565
565
flag_evaluation_options : typing .Optional [FlagEvaluationOptions ] = None ,
566
- ) -> typing . Coroutine [ typing . Any , typing . Any , float ] :
566
+ ) -> float :
567
567
details = await self .get_float_details (
568
568
flag_key ,
569
569
default_value ,
@@ -578,7 +578,7 @@ async def get_float_details(
578
578
default_value : float ,
579
579
evaluation_context : typing .Optional [EvaluationContext ] = None ,
580
580
flag_evaluation_options : typing .Optional [FlagEvaluationOptions ] = None ,
581
- ) -> typing . Coroutine [ typing . Any , typing . Any , FlagEvaluationDetails [float ] ]:
581
+ ) -> FlagEvaluationDetails [float ]:
582
582
return await self .evaluate_flag_details (
583
583
FlagType .FLOAT ,
584
584
flag_key ,
@@ -593,7 +593,7 @@ async def get_object_value(
593
593
default_value : typing .Union [dict , list ],
594
594
evaluation_context : typing .Optional [EvaluationContext ] = None ,
595
595
flag_evaluation_options : typing .Optional [FlagEvaluationOptions ] = None ,
596
- ) -> typing .Coroutine [ typing . Any , typing . Any , typing . Union [dict , list ] ]:
596
+ ) -> typing .Union [dict , list ]:
597
597
details = await self .get_object_details (
598
598
flag_key ,
599
599
default_value ,
@@ -608,9 +608,7 @@ async def get_object_details(
608
608
default_value : typing .Union [dict , list ],
609
609
evaluation_context : typing .Optional [EvaluationContext ] = None ,
610
610
flag_evaluation_options : typing .Optional [FlagEvaluationOptions ] = None ,
611
- ) -> typing .Coroutine [
612
- typing .Any , typing .Any , FlagEvaluationDetails [typing .Union [dict , list ]]
613
- ]:
611
+ ) -> FlagEvaluationDetails [typing .Union [dict , list ]]:
614
612
return await self .evaluate_flag_details (
615
613
FlagType .OBJECT ,
616
614
flag_key ,
@@ -626,7 +624,7 @@ async def evaluate_flag_details( # noqa: PLR0915
626
624
default_value : typing .Any ,
627
625
evaluation_context : typing .Optional [EvaluationContext ] = None ,
628
626
flag_evaluation_options : typing .Optional [FlagEvaluationOptions ] = None ,
629
- ) -> typing . Coroutine [ typing . Any , typing . Any , FlagEvaluationDetails [typing .Any ] ]:
627
+ ) -> FlagEvaluationDetails [typing .Any ]:
630
628
"""
631
629
Evaluate the flag requested by the user from the clients provider.
632
630
@@ -772,7 +770,7 @@ async def _create_provider_evaluation(
772
770
flag_key : str ,
773
771
default_value : typing .Any ,
774
772
evaluation_context : typing .Optional [EvaluationContext ] = None ,
775
- ) -> typing . Coroutine [ typing . Any , typing . Any , FlagEvaluationDetails [typing .Any ] ]:
773
+ ) -> FlagEvaluationDetails [typing .Any ]:
776
774
"""
777
775
Asynchronous encapsulated method to create a FlagEvaluationDetail from a specific provider.
778
776
@@ -801,7 +799,7 @@ async def _create_provider_evaluation(
801
799
if not get_details_callable :
802
800
raise GeneralError (error_message = "Unknown flag type" )
803
801
804
- resolution = await get_details_callable (* args )
802
+ resolution = await get_details_callable (* args ) # type: ignore[misc]
805
803
resolution .raise_for_error ()
806
804
807
805
# we need to check the get_args to be compatible with union types.
0 commit comments