Skip to content

Commit 095bb07

Browse files
authored
Merge pull request microsoft#628 from Fr4nc3/macae-rfp-af-101725
Add explicit pass statements to abstract methods
2 parents edde1df + 6ae6110 commit 095bb07

File tree

1 file changed

+43
-5
lines changed

1 file changed

+43
-5
lines changed

src/backend/common/database/database_base.py

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,30 @@ class DatabaseBase(ABC):
2121
@abstractmethod
2222
async def initialize(self) -> None:
2323
"""Initialize the database client and create containers if needed."""
24+
pass
2425

2526
@abstractmethod
2627
async def close(self) -> None:
2728
"""Close database connection."""
29+
pass
2830

2931
# Core CRUD Operations
3032
@abstractmethod
3133
async def add_item(self, item: BaseDataModel) -> None:
3234
"""Add an item to the database."""
35+
pass
3336

3437
@abstractmethod
3538
async def update_item(self, item: BaseDataModel) -> None:
3639
"""Update an item in the database."""
40+
pass
3741

3842
@abstractmethod
3943
async def get_item_by_id(
4044
self, item_id: str, partition_key: str, model_class: Type[BaseDataModel]
4145
) -> Optional[BaseDataModel]:
4246
"""Retrieve an item by its ID and partition key."""
47+
pass
4348

4449
@abstractmethod
4550
async def query_items(
@@ -49,92 +54,113 @@ async def query_items(
4954
model_class: Type[BaseDataModel],
5055
) -> List[BaseDataModel]:
5156
"""Query items from the database and return a list of model instances."""
57+
pass
5258

5359
@abstractmethod
5460
async def delete_item(self, item_id: str, partition_key: str) -> None:
5561
"""Delete an item from the database."""
62+
pass
5663

5764
# Plan Operations
5865
@abstractmethod
5966
async def add_plan(self, plan: Plan) -> None:
6067
"""Add a plan to the database."""
68+
pass
6169

6270
@abstractmethod
6371
async def update_plan(self, plan: Plan) -> None:
6472
"""Update a plan in the database."""
73+
pass
6574

6675
@abstractmethod
6776
async def get_plan_by_plan_id(self, plan_id: str) -> Optional[Plan]:
6877
"""Retrieve a plan by plan_id."""
78+
pass
6979

7080
@abstractmethod
7181
async def get_plan(self, plan_id: str) -> Optional[Plan]:
7282
"""Retrieve a plan by plan_id."""
83+
pass
7384

7485
@abstractmethod
7586
async def get_all_plans(self) -> List[Plan]:
7687
"""Retrieve all plans for the user."""
88+
pass
7789

7890
@abstractmethod
7991
async def get_all_plans_by_team_id(self, team_id: str) -> List[Plan]:
8092
"""Retrieve all plans for a specific team."""
93+
pass
8194

8295
@abstractmethod
8396
async def get_all_plans_by_team_id_status(
8497
self, user_id: str, team_id: str, status: str
8598
) -> List[Plan]:
8699
"""Retrieve all plans for a specific team."""
100+
pass
87101

88102
# Step Operations
89103
@abstractmethod
90104
async def add_step(self, step: Step) -> None:
91105
"""Add a step to the database."""
106+
pass
92107

93108
@abstractmethod
94109
async def update_step(self, step: Step) -> None:
95110
"""Update a step in the database."""
111+
pass
96112

97113
@abstractmethod
98114
async def get_steps_by_plan(self, plan_id: str) -> List[Step]:
99115
"""Retrieve all steps for a plan."""
116+
pass
100117

101118
@abstractmethod
102119
async def get_step(self, step_id: str, session_id: str) -> Optional[Step]:
103120
"""Retrieve a step by step_id and session_id."""
121+
pass
104122

105123
# Team Operations
106124
@abstractmethod
107125
async def add_team(self, team: TeamConfiguration) -> None:
108126
"""Add a team configuration to the database."""
127+
pass
109128

110129
@abstractmethod
111130
async def update_team(self, team: TeamConfiguration) -> None:
112131
"""Update a team configuration in the database."""
132+
pass
113133

114134
@abstractmethod
115135
async def get_team(self, team_id: str) -> Optional[TeamConfiguration]:
116136
"""Retrieve a team configuration by team_id."""
137+
pass
117138

118139
@abstractmethod
119140
async def get_team_by_id(self, team_id: str) -> Optional[TeamConfiguration]:
120141
"""Retrieve a team configuration by internal id."""
142+
pass
121143

122144
@abstractmethod
123145
async def get_all_teams(self) -> List[TeamConfiguration]:
124146
"""Retrieve all team configurations for the given user."""
147+
pass
125148

126149
@abstractmethod
127150
async def delete_team(self, team_id: str) -> bool:
128151
"""Delete a team configuration by team_id and return True if deleted."""
152+
pass
129153

130154
# Data Management Operations
131155
@abstractmethod
132156
async def get_data_by_type(self, data_type: str) -> List[BaseDataModel]:
133157
"""Retrieve all data of a specific type."""
158+
pass
134159

135160
@abstractmethod
136161
async def get_all_items(self) -> List[Dict[str, Any]]:
137162
"""Retrieve all items as dictionaries."""
163+
pass
138164

139165
# Context Manager Support
140166
async def __aenter__(self):
@@ -149,47 +175,59 @@ async def __aexit__(self, exc_type, exc, tb):
149175
@abstractmethod
150176
async def get_steps_for_plan(self, plan_id: str) -> List[Step]:
151177
"""Convenience method aliasing get_steps_by_plan for compatibility."""
178+
pass
152179

153180
@abstractmethod
154181
async def get_current_team(self, user_id: str) -> Optional[UserCurrentTeam]:
155182
"""Retrieve the current team for a user."""
183+
pass
156184

157185
@abstractmethod
158186
async def delete_current_team(self, user_id: str) -> Optional[UserCurrentTeam]:
159187
"""Retrieve the current team for a user."""
188+
pass
160189

161190
@abstractmethod
162191
async def set_current_team(self, current_team: UserCurrentTeam) -> None:
192+
"""Set the current team for a user."""
163193
pass
164194

165195
@abstractmethod
166196
async def update_current_team(self, current_team: UserCurrentTeam) -> None:
167197
"""Update the current team for a user."""
198+
pass
168199

169200
@abstractmethod
170201
async def delete_plan_by_plan_id(self, plan_id: str) -> bool:
171-
"""Retrieve the current team for a user."""
202+
"""Delete a plan by plan_id and return True if deleted."""
203+
pass
172204

173205
@abstractmethod
174206
async def add_mplan(self, mplan: messages.MPlan) -> None:
175-
"""Add a team configuration to the database."""
207+
"""Add an mplan configuration to the database."""
208+
pass
176209

177210
@abstractmethod
178211
async def update_mplan(self, mplan: messages.MPlan) -> None:
179-
"""Update a team configuration in the database."""
212+
"""Update an mplan configuration in the database."""
213+
pass
180214

181215
@abstractmethod
182216
async def get_mplan(self, plan_id: str) -> Optional[messages.MPlan]:
183-
"""Retrieve a mplan configuration by plan_id."""
217+
"""Retrieve an mplan configuration by plan_id."""
218+
pass
184219

185220
@abstractmethod
186221
async def add_agent_message(self, message: AgentMessageData) -> None:
222+
"""Add an agent message to the database."""
187223
pass
188224

189225
@abstractmethod
190226
async def update_agent_message(self, message: AgentMessageData) -> None:
191227
"""Update an agent message in the database."""
228+
pass
192229

193230
@abstractmethod
194231
async def get_agent_messages(self, plan_id: str) -> Optional[AgentMessageData]:
195-
"""Retrieve an agent message by message_id."""
232+
"""Retrieve agent messages by plan_id."""
233+
pass

0 commit comments

Comments
 (0)