@@ -19,11 +19,11 @@ def __call__(self, func: Callable) -> Callable:
1919 装饰器调用入口
2020 """
2121 # 添加类型标记(供with_dynamic_params验证)
22- func ._is_param_generator = True
23- func ._scope = self .scope
24- func ._cache_enabled = self .cache_enabled
25- func ._lazy_support = self .lazy_support
26- func ._decorator_args = {
22+ func ._is_param_generator = True # type: ignore[attr-defined]
23+ func ._scope = self .scope # type: ignore[attr-defined]
24+ func ._cache_enabled = self .cache_enabled # type: ignore[attr-defined]
25+ func ._lazy_support = self .lazy_support # type: ignore[attr-defined]
26+ func ._decorator_args = { # type: ignore[attr-defined]
2727 "scope" : self .scope ,
2828 "cache_enabled" : self .cache_enabled ,
2929 "lazy_support" : self .lazy_support ,
@@ -73,24 +73,24 @@ def decorator(test_func: Callable) -> Callable:
7373 )
7474
7575 # Initialize dynamic param attributes on test function
76- test_func ._dynamic_param_mapping = param_mapping
77- test_func ._requires_dynamic_params = True
76+ test_func ._mapping = param_mapping # type: ignore[attr-defined]
77+ test_func ._requires = True # type: ignore[attr-defined]
7878
7979 # Mark function as dynamic param test
80- test_func .pytestmark = getattr (test_func , "pytestmark" , [])
81- test_func .pytestmark .append (pytest .mark .dynamic_param )
80+ test_func .pytestmark = getattr (test_func , "pytestmark" , []) # type: ignore
81+ test_func .pytestmark .append (pytest .mark .dynamic_param ) # type: ignore
8282
8383 @functools .wraps (test_func )
8484 def wrapper (* args , ** kwargs ):
8585 return test_func (* args , ** kwargs )
8686
8787 # 传递动态参数元数据到wrapper
88- wrapper ._dynamic_param_mapping = test_func ._dynamic_param_mapping
89- wrapper ._requires_dynamic_params = test_func ._requires_dynamic_params
88+ wrapper ._mapping = test_func ._mapping # type: ignore[attr-defined]
89+ wrapper ._requires = test_func ._requires # type: ignore[attr-defined]
9090
9191 # 确保wrapper也被识别为测试
92- wrapper .pytestmark = getattr (wrapper , "pytestmark" , [])
93- wrapper .pytestmark .append (pytest .mark .dynamic_param )
92+ wrapper .pytestmark = getattr (wrapper , "pytestmark" , []) # type: ignore
93+ wrapper .pytestmark .append (pytest .mark .dynamic_param ) # type: ignore
9494
9595 # 确保wrapper有正确的 __name__
9696 wrapper .__name__ = test_func .__name__
0 commit comments