Skip to content

Commit

Permalink
fix: try002 for provider apache cassandra
Browse files Browse the repository at this point in the history
  • Loading branch information
dondaum committed Apr 6, 2024
1 parent 6fd8f36 commit d7123c7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion airflow/providers/apache/cassandra/hooks/cassandra.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def get_lb_policy(policy_name: str, policy_args: dict[str, Any]) -> Policy:
if policy_name == "WhiteListRoundRobinPolicy":
hosts = policy_args.get("hosts")
if not hosts:
raise Exception("Hosts must be specified for WhiteListRoundRobinPolicy")
raise ValueError("Hosts must be specified for WhiteListRoundRobinPolicy")
return WhiteListRoundRobinPolicy(hosts)

if policy_name == "TokenAwarePolicy":
Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,6 @@ combine-as-imports = true
# amazon
"airflow/providers/amazon/aws/operators/athena.py" = ["TRY002"]
"airflow/providers/amazon/aws/operators/emr.py" = ["TRY002"]
# apache.cassandra
"airflow/providers/apache/cassandra/hooks/cassandra.py" = ["TRY002"]
# cncf.kubernetes
"airflow/providers/cncf/kubernetes/operators/pod.py" = ["TRY002"]
# common.sql
Expand Down

0 comments on commit d7123c7

Please sign in to comment.