omnata-plugin-runtime 0.6.3a169__tar.gz → 0.6.4a171__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: omnata-plugin-runtime
3
- Version: 0.6.3a169
3
+ Version: 0.6.4a171
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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "omnata-plugin-runtime"
3
- version = "0.6.3-a169"
3
+ version = "0.6.4-a171"
4
4
  description = "Classes and common runtime components for building and running Omnata Plugins"
5
5
  authors = ["James Weakley <james.weakley@omnata.com>"]
6
6
  readme = "README.md"
@@ -2357,6 +2357,8 @@ def omnata_udtf(
2357
2357
  data_type='OBJECT',
2358
2358
  description='The connection object, obtained from calling PLUGIN.PLUGIN_CONNECTION.')] + params
2359
2359
  cls._omnata_udtf_params = params_new
2360
+ else:
2361
+ cls._omnata_udtf_params = params
2360
2362
  if len(cls._omnata_udtf_params) != len(function_params) -1:
2361
2363
  raise ValueError(f"You must document all the parameters of the 'process' function in the @omnata_udtf decorator in the same order ('connection_parameters' will be included automatically).")
2362
2364
 
@@ -2471,6 +2473,8 @@ def omnata_udf(
2471
2473
  data_type='OBJECT',
2472
2474
  description='The connection object, obtained from calling PLUGIN.PLUGIN_CONNECTION.')] + params
2473
2475
  func._omnata_udf_params = params_new
2476
+ else:
2477
+ func._omnata_udf_params = params
2474
2478
  if len(func._omnata_udf_params) != len(function_params):
2475
2479
  raise ValueError(f"You must document all the parameters of the function in the @omnata_udf decorator in the same order ('connection_parameters' will be included automatically).")
2476
2480
 
@@ -60,8 +60,8 @@ class PluginEntrypoint:
60
60
  self._plugin_instance: OmnataPlugin = class_obj()
61
61
  self._plugin_instance._session = session # pylint: disable=protected-access
62
62
  # logging defaults
63
- logger = logging.getLogger("snowflake")
64
- logger.setLevel(logging.WARN) # we don't want snowflake queries being logged by default
63
+ snowflake_logger = logging.getLogger("snowflake")
64
+ snowflake_logger.setLevel(logging.WARN) # we don't want snowflake queries being logged by default
65
65
  # the sync engine can tell the plugin to override log level via a session variable
66
66
  if session is not None:
67
67
  try:
@@ -70,10 +70,10 @@ class PluginEntrypoint:
70
70
  if result is not None:
71
71
  log_level_overrides:Dict[str,str] = json.loads(result)
72
72
  for logger_name,level in log_level_overrides.items():
73
- logger = logging.getLogger(logger_name)
74
- logger.setLevel(level)
75
- logger.propagate = False
76
- for handler in logger.handlers:
73
+ logger_override = logging.getLogger(logger_name)
74
+ logger_override.setLevel(level)
75
+ logger_override.propagate = False
76
+ for handler in logger_override.handlers:
77
77
  handler.setLevel(level)
78
78
  except Exception as e:
79
79
  logger.error(f"Error setting log level overrides: {str(e)}")