Skip to content

Commit f00d1dc

Browse files
fix: update type hint for test_connection methods to allow None
1 parent 7d1dac5 commit f00d1dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

insights/insights/doctype/insights_data_source_v3/insights_data_source_v3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def get_table_list(self):
328328
return db.list_tables(database=quoted_db_name)
329329

330330
@frappe.whitelist()
331-
def test_connection(self, raise_exception: bool = False):
331+
def test_connection(self, raise_exception: bool | None = False):
332332
if self.type == "REST API":
333333
return self.test_api_connection(raise_exception)
334334

@@ -339,7 +339,7 @@ def test_connection(self, raise_exception: bool = False):
339339
if raise_exception:
340340
raise e
341341

342-
def test_api_connection(self, raise_exception=False):
342+
def test_api_connection(self, raise_exception: bool | None = False):
343343
client = self.get_api_client()
344344
try:
345345
client.test_connection()

0 commit comments

Comments
 (0)