1313```
1414"""
1515
16- from typing import Literal
16+ from typing import Literal , cast
1717
1818import pytest
1919
2020
2121@pytest .fixture
2222def connector_image_override (request : pytest .FixtureRequest ) -> str | None :
2323 """Return the value of --connector-image, or None if not set."""
24- return request .config .getoption ("--connector-image" )
24+ return cast ( str | None , request .config .getoption ("--connector-image" ) )
2525
2626
2727@pytest .fixture
@@ -41,14 +41,14 @@ def read_from_streams(
4141 - `--read-from-streams=false`: Do not read from any streams.
4242 - `--read-from-streams=none`: Do not read from any streams.
4343 """
44- input_val : str | bool | None = request .config .getoption (
44+ input_val : str = request .config .getoption (
4545 "--read-from-streams" ,
46- default = "suggested " , # type: ignore
46+ default = "default " , # type: ignore
4747 ) # type: ignore
4848
4949 if isinstance (input_val , str ):
5050 if input_val .lower () == "false" :
51- return False
51+ return "none"
5252 if input_val .lower () in ["true" , "suggested" , "default" ]:
5353 # Default to 'default' (suggested) streams if the input is 'true', 'suggested', or
5454 # 'default'.
@@ -64,7 +64,7 @@ def read_from_streams(
6464 return input_val .split ("," )
6565
6666 # Else, probably a bool; return it as is.
67- return input_val or False
67+ return input_val or "none"
6868
6969
7070@pytest .fixture
@@ -82,7 +82,13 @@ def read_scenarios(
8282 - `--read-scenarios=scenario1,scenario2`: Read the specified scenarios only.
8383
8484 """
85- input_val = request .config .getoption ("--read-scenarios" , default = "default" )
85+ input_val = cast (
86+ str ,
87+ request .config .getoption (
88+ "--read-scenarios" ,
89+ default = "default" , # type: ignore
90+ ),
91+ )
8692
8793 if input_val .lower () == "default" :
8894 # Default config scenario is always 'config.json'.
0 commit comments