File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -243,16 +243,26 @@ def apply_global_args_to_plugin(
243243 else :
244244 run_args [key ] = global_args [key ]
245245
246- if "collection_args" in global_args and hasattr (plugin_class , "COLLECTOR_ARGS" ):
247- plugin_fields = set (plugin_class .COLLECTOR_ARGS .__fields__ .keys ())
246+ if (
247+ "collection_args" in global_args
248+ and hasattr (plugin_class , "COLLECTOR_ARGS" )
249+ and plugin_class .COLLECTOR_ARGS is not None
250+ ):
251+
252+ plugin_fields = set (plugin_class .COLLECTOR_ARGS .model_fields .keys ())
248253 filtered = {
249254 k : v for k , v in global_args ["collection_args" ].items () if k in plugin_fields
250255 }
251256 if filtered :
252257 run_args ["collection_args" ] = filtered
253258
254- if "analysis_args" in global_args and hasattr (plugin_class , "ANALYZER_ARGS" ):
255- plugin_fields = set (plugin_class .ANALYZER_ARGS .__fields__ .keys ())
259+ if (
260+ "analysis_args" in global_args
261+ and hasattr (plugin_class , "ANALYZER_ARGS" )
262+ and plugin_class .ANALYZER_ARGS is not None
263+ ):
264+
265+ plugin_fields = set (plugin_class .ANALYZER_ARGS .model_fields .keys ())
256266 filtered = {k : v for k , v in global_args ["analysis_args" ].items () if k in plugin_fields }
257267 if filtered :
258268 run_args ["analysis_args" ] = filtered
You can’t perform that action at this time.
0 commit comments