Skip to content

Commit a57e972

Browse files
Kristian NylundKristian Nylund
authored andcommitted
-
1 parent 05f865d commit a57e972

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

text_2_sql/autogen/src/autogen_text_2_sql/state_store.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def save_state(self, thread_id: str, state: dict) -> None:
2525

2626

2727
class CosmosStateStore(StateStore):
28-
def __init__(self, endpoint, database, container, credential, partition_key = None):
28+
def __init__(self, endpoint, database, container, credential, partition_key=None):
2929
client = CosmosClient(
3030
url=endpoint,
3131
credential=credential
@@ -37,10 +37,10 @@ def __init__(self, endpoint, database, container, credential, partition_key = No
3737
# Set partition key field name
3838
props = self._db.read()
3939
pk_paths = props["partitionKey"]["paths"]
40-
if (len(pk_paths) != 1):
40+
if len(pk_paths) != 1:
4141
raise ValueError("Only single partition key is supported")
4242
self.partition_key_name = pk_paths[0].lstrip("/")
43-
if ("/" in self.partition_key_name):
43+
if "/" in self.partition_key_name:
4444
raise ValueError("Only top-level partition key is supported")
4545

4646
def get_state(self, thread_id: str) -> dict:

0 commit comments

Comments
 (0)