Remove None from returns

pull/1160/head
mijauexe 2 years ago
parent a9baac6fef
commit 9c79fa6964

@ -115,7 +115,7 @@ class Frontend(FileDiffMixin, GitMixin, BaseAgent):
return False
async def iterate_frontend(self) -> bool | None:
async def iterate_frontend(self):
"""
Iterates over the frontend.
@ -313,7 +313,7 @@ class Frontend(FileDiffMixin, GitMixin, BaseAgent):
return AgentResponse.done(self)
async def remove_mock(self) -> bool | None:
async def remove_mock(self):
"""
Remove mock API from the backend and replace it with api endpoints defined in the external documentation
"""

@ -52,11 +52,11 @@ class Wizard(BaseAgent):
async def run(self) -> AgentResponse:
success = await self.init_frontend()
if success is None:
if not success:
return AgentResponse.exit(self)
return AgentResponse.done(self)
async def init_frontend(self) -> bool | None:
async def init_frontend(self) -> bool:
"""
Sets up the frontend
@ -88,7 +88,7 @@ class Wizard(BaseAgent):
success = await self.upload_docs(docs.text.strip())
if not success:
await self.send_message("Please try creating a new project.")
return None
return False
else:
break
except Exception as e:

Loading…
Cancel
Save