refac
This commit is contained in:
@@ -1678,7 +1678,5 @@ async def get_doc_as_markdown(
|
||||
_comment_tools = create_comment_tools("document", "document_id")
|
||||
|
||||
# Extract and register the functions
|
||||
read_doc_comments = _comment_tools["read_comments"]
|
||||
create_doc_comment = _comment_tools["create_comment"]
|
||||
reply_to_comment = _comment_tools["reply_to_comment"]
|
||||
resolve_comment = _comment_tools["resolve_comment"]
|
||||
list_document_comments = _comment_tools["list_comments"]
|
||||
manage_document_comment = _comment_tools["manage_comment"]
|
||||
|
||||
@@ -1247,7 +1247,5 @@ async def create_sheet(
|
||||
_comment_tools = create_comment_tools("spreadsheet", "spreadsheet_id")
|
||||
|
||||
# Extract and register the functions
|
||||
read_sheet_comments = _comment_tools["read_comments"]
|
||||
create_sheet_comment = _comment_tools["create_comment"]
|
||||
reply_to_sheet_comment = _comment_tools["reply_to_comment"]
|
||||
resolve_sheet_comment = _comment_tools["resolve_comment"]
|
||||
list_spreadsheet_comments = _comment_tools["list_comments"]
|
||||
manage_spreadsheet_comment = _comment_tools["manage_comment"]
|
||||
|
||||
@@ -322,13 +322,9 @@ You can view or download the thumbnail using the provided URL."""
|
||||
|
||||
# Create comment management tools for slides
|
||||
_comment_tools = create_comment_tools("presentation", "presentation_id")
|
||||
read_presentation_comments = _comment_tools["read_comments"]
|
||||
create_presentation_comment = _comment_tools["create_comment"]
|
||||
reply_to_presentation_comment = _comment_tools["reply_to_comment"]
|
||||
resolve_presentation_comment = _comment_tools["resolve_comment"]
|
||||
list_presentation_comments = _comment_tools["list_comments"]
|
||||
manage_presentation_comment = _comment_tools["manage_comment"]
|
||||
|
||||
# Aliases for backwards compatibility and intuitive naming
|
||||
read_slide_comments = read_presentation_comments
|
||||
create_slide_comment = create_presentation_comment
|
||||
reply_to_slide_comment = reply_to_presentation_comment
|
||||
resolve_slide_comment = resolve_presentation_comment
|
||||
list_slide_comments = list_presentation_comments
|
||||
manage_slide_comment = manage_presentation_comment
|
||||
|
||||
@@ -291,9 +291,7 @@ class TestImports:
|
||||
assert hasattr(contacts_tools, "list_contacts")
|
||||
assert hasattr(contacts_tools, "get_contact")
|
||||
assert hasattr(contacts_tools, "search_contacts")
|
||||
assert hasattr(contacts_tools, "create_contact")
|
||||
assert hasattr(contacts_tools, "update_contact")
|
||||
assert hasattr(contacts_tools, "delete_contact")
|
||||
assert hasattr(contacts_tools, "manage_contact")
|
||||
|
||||
def test_import_group_tools(self):
|
||||
"""Test that group tools can be imported."""
|
||||
@@ -301,18 +299,13 @@ class TestImports:
|
||||
|
||||
assert hasattr(contacts_tools, "list_contact_groups")
|
||||
assert hasattr(contacts_tools, "get_contact_group")
|
||||
assert hasattr(contacts_tools, "create_contact_group")
|
||||
assert hasattr(contacts_tools, "update_contact_group")
|
||||
assert hasattr(contacts_tools, "delete_contact_group")
|
||||
assert hasattr(contacts_tools, "modify_contact_group_members")
|
||||
assert hasattr(contacts_tools, "manage_contact_group")
|
||||
|
||||
def test_import_batch_tools(self):
|
||||
"""Test that batch tools can be imported."""
|
||||
from gcontacts import contacts_tools
|
||||
|
||||
assert hasattr(contacts_tools, "batch_create_contacts")
|
||||
assert hasattr(contacts_tools, "batch_update_contacts")
|
||||
assert hasattr(contacts_tools, "batch_delete_contacts")
|
||||
assert hasattr(contacts_tools, "manage_contacts_batch")
|
||||
|
||||
|
||||
class TestConstants:
|
||||
|
||||
Reference in New Issue
Block a user