omnata-plugin-runtime 0.5.7a132__py3-none-any.whl → 0.5.7a133__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2242,21 +2242,14 @@ def consumer_udtf(param_docs: Dict[str, Dict[str, Any]]):
2242
2242
 
2243
2243
  if list(params.keys())[1] != 'connection_parameters':
2244
2244
  raise ValueError("The second argument should be 'connection_parameters'.")
2245
-
2246
- # Create a Pydantic model based on the function signature and the provided documentation
2247
- fields = {
2248
- name: (param.annotation, param_docs.get(name, {}).get("default", param.default))
2249
- for name, param in params.items()
2250
- if name != 'cls' and name != 'connection_parameters'
2251
- }
2245
+
2246
+ if params[list(params.keys())[1]].annotation != Dict:
2247
+ raise ValueError("The second argument must be a dict.")
2252
2248
 
2253
2249
  @wraps(original_process)
2254
2250
  def wrapped_process(self, connection_parameters, *args, **kwargs):
2255
2251
  if connection_parameters is None:
2256
2252
  raise ValueError("Connection not found")
2257
-
2258
- if not isinstance(connection_parameters, Dict):
2259
- raise ValueError("The first argument must be an object, the result of calling PLUGIN_CONNECTION.")
2260
2253
 
2261
2254
  # convert the connection parameters dictionary to a ConnectionConfigurationParameters object which includes the real secrets
2262
2255
  if 'other_secrets_name' in connection_parameters:
@@ -2309,14 +2302,14 @@ def consumer_udf(param_docs: Dict[str, Dict[str, Any]]):
2309
2302
  # Ensure the first argument is mandatory and positional
2310
2303
  if list(params.keys())[0] != 'connection_parameters':
2311
2304
  raise ValueError("The first argument should be 'connection_parameters'.")
2305
+ if params[list(params.keys())[0]].annotation != Dict:
2306
+ raise ValueError("The first argument must be a dict.")
2312
2307
 
2313
2308
  @wraps(func)
2314
2309
  def wrapper(self, connection_parameters, *args, **kwargs):
2315
2310
  if connection_parameters is None:
2316
2311
  raise ValueError("Connection not found")
2317
2312
 
2318
- if not isinstance(connection_parameters, Dict):
2319
- raise ValueError("The first argument must be an object, the result of calling PLUGIN_CONNECTION.")
2320
2313
 
2321
2314
  # convert the connection parameters dictionary to a ConnectionConfigurationParameters object which includes the real secrets
2322
2315
  if 'other_secrets_name' in connection_parameters:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: omnata-plugin-runtime
3
- Version: 0.5.7a132
3
+ Version: 0.5.7a133
4
4
  Summary: Classes and common runtime components for building and running Omnata Plugins
5
5
  Author: James Weakley
6
6
  Author-email: james.weakley@omnata.com
@@ -3,10 +3,10 @@ omnata_plugin_runtime/api.py,sha256=FxzTqri4no8ClkOm7vZADG8aD47jcGBCTTQDEORmOJM,
3
3
  omnata_plugin_runtime/configuration.py,sha256=TI6GaVFhewVawBCaYN34GujY57qEP6q2nik4YpSEk5s,38100
4
4
  omnata_plugin_runtime/forms.py,sha256=GzSPEwcijsoPCXEO1mHiE8ylvX_KSE5TkhwqkymA2Ss,19755
5
5
  omnata_plugin_runtime/logging.py,sha256=bn7eKoNWvtuyTk7RTwBS9UARMtqkiICtgMtzq3KA2V0,3272
6
- omnata_plugin_runtime/omnata_plugin.py,sha256=eV1QKOqdxktkVB3ZEQPS7A9a9q7UOsyEhfyZ-JwV5iw,117231
6
+ omnata_plugin_runtime/omnata_plugin.py,sha256=yY2f5xE0VnzfGiL8CGyje_rVbZmCMgm6NYiaWxt-N1k,116805
7
7
  omnata_plugin_runtime/plugin_entrypoints.py,sha256=PFSLsYEVnWHVvSoOYTtTK2JY6pp6_8_eYP53WqLRiPE,27975
8
8
  omnata_plugin_runtime/rate_limiting.py,sha256=DVQ_bc-mVLBkrU1PTns1MWXhHiLpSB5HkWCcdePtJ2A,25611
9
- omnata_plugin_runtime-0.5.7a132.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
10
- omnata_plugin_runtime-0.5.7a132.dist-info/METADATA,sha256=YHhi631jWmg1ZBJuNsry--DCdhMxWVNynL2ZreqnS7w,1985
11
- omnata_plugin_runtime-0.5.7a132.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
12
- omnata_plugin_runtime-0.5.7a132.dist-info/RECORD,,
9
+ omnata_plugin_runtime-0.5.7a133.dist-info/LICENSE,sha256=IMF9i4xIpgCADf0U-V1cuf9HBmqWQd3qtI3FSuyW4zE,26526
10
+ omnata_plugin_runtime-0.5.7a133.dist-info/METADATA,sha256=hR1rJW54yER8oVdKnh8VddCA_iRFGVWVAl9VaEfCd3M,1985
11
+ omnata_plugin_runtime-0.5.7a133.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
12
+ omnata_plugin_runtime-0.5.7a133.dist-info/RECORD,,