Skip to content

Commit

Permalink
update kwarg function name
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh committed Dec 15, 2022
1 parent c5c50ed commit 06e115b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion superset/databases/ssh_tunnel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class SSHTunnel(Model, AuditMixinNullable, ExtraJSONMixin, ImportExportMixin):
EncryptedType(sa.String, app_config["SECRET_KEY"]), nullable=True
)

def parameters(self, bind_host: str, bind_port: int) -> Dict[str, Any]:
def kwarg_parameters(self, bind_host: str, bind_port: int) -> Dict[str, Any]:
params = {
"ssh_address_or_host": self.server_address,
"ssh_port": self.server_port,
Expand Down
4 changes: 3 additions & 1 deletion superset/models/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,9 @@ def get_sqla_engine_with_context(
):
# if ssh_tunnel is available build engine with information
url = make_url_safe(self.sqlalchemy_uri_decrypted)
ssh_params = ssh_tunnel.parameters(bind_host=url.host, bind_port=url.port)
ssh_params = ssh_tunnel.kwarg_parameters(
bind_host=url.host, bind_port=url.port
)
engine_context = sshtunnel.open_tunnel(**ssh_params)
else:
engine_context = nullcontext()
Expand Down

0 comments on commit 06e115b

Please sign in to comment.