Skip to content

Commit fb381a1

Browse files
committed
lintfix
1 parent b512fb0 commit fb381a1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

rsconnect/api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
TaskStatusV1,
7777
UserRecord,
7878
)
79-
from .snowflake import ensure_snow_installed, generate_jwt, get_connection_parameters
79+
from .snowflake import generate_jwt, get_connection_parameters
8080
from .timeouts import get_task_timeout, get_task_timeout_help_message
8181

8282
if TYPE_CHECKING:

rsconnect/snowflake.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import json
22
from subprocess import CalledProcessError, run
3-
from typing import Any, Dict, Optional, cast
3+
from typing import Optional
44

55
from .exception import RSConnectException
66
from .log import logger
@@ -13,7 +13,7 @@ def snow(*args: str):
1313

1414
def ensure_snow_installed() -> None:
1515
try:
16-
import snowflake.cli
16+
import snowflake.cli # noqa
1717

1818
logger.debug("snowflake-cli is installed.")
1919

@@ -33,7 +33,7 @@ def list_connections():
3333
res = snow("connection", "list", "--format", "json")
3434
connection_list = json.loads(res.stdout)
3535
return connection_list
36-
except:
36+
except CalledProcessError:
3737
raise RSConnectException("Could not list snowflake connections.")
3838

3939

@@ -64,7 +64,7 @@ def generate_jwt(name: Optional[str] = None):
6464
res = snow("connection", "generate-jwt", "--connection", connection_name, "--format", "json")
6565
try:
6666
output = json.loads(res.stdout)
67-
except json.JSONDecodeError as e:
67+
except json.JSONDecodeError:
6868
raise RSConnectException(f"Failed to parse JSON from snow-cli: {res.stdout}")
6969
jwt = output.get("message")
7070
if jwt is None:

0 commit comments

Comments
 (0)