Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spanner_graphs/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def mock(cls) -> 'DatabaseSelector':
return cls(env=SpannerEnv.MOCK)

@classmethod
def experimental_host(
def for_experimental_host(
cls, experimental_host: str, database: str, use_plain_text: bool = False, ca_certificate: str | None = None, client_certificate: str | None = None, client_key: str | None = None
) -> "DatabaseSelector":
"""Creates a selector for a Google Experimental Host Spanner database."""
Expand Down
2 changes: 1 addition & 1 deletion spanner_graphs/graph_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def dict_to_selector(selector_dict: Dict[str, Any]) -> DatabaseSelector:
elif env == SpannerEnv.MOCK:
return DatabaseSelector.mock()
elif env == SpannerEnv.EXPERIMENTAL_HOST:
return DatabaseSelector.experimental_host(
return DatabaseSelector.for_experimental_host(
selector_dict["experimental_host"], selector_dict["database"], selector_dict["use_plain_text"], selector_dict["ca_certificate"], selector_dict["client_certificate"], selector_dict["client_key"]
)
raise ValueError(f"Invalid env in selector dict: {selector_dict}")
Expand Down
2 changes: 1 addition & 1 deletion spanner_graphs/magics.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def spanner_graph(self, line: str, cell: str):
if bool(args.client_certificate) != bool(args.client_key):
raise ValueError("client_certificate and client_key must both be provided together.")

selector = DatabaseSelector.experimental_host(
selector = DatabaseSelector.for_experimental_host(
experimental_host=args.experimental_host, database=args.database, use_plain_text=args.use_plain_text, ca_certificate=args.ca_certificate, client_certificate=args.client_certificate, client_key=args.client_key
)
else:
Expand Down
Loading