From 36dc22ae569e5b43c94781f66274ec13b3979475 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Tue, 8 Feb 2022 18:38:15 +0000 Subject: [PATCH] aio.api.aspell/ --- aio.api.aspell/aio/api/aspell/abstract/api.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/aio.api.aspell/aio/api/aspell/abstract/api.py b/aio.api.aspell/aio/api/aspell/abstract/api.py index e99b7bf54..9f622e1cf 100644 --- a/aio.api.aspell/aio/api/aspell/abstract/api.py +++ b/aio.api.aspell/aio/api/aspell/abstract/api.py @@ -118,22 +118,14 @@ async def pipe(self): async def listener(self): print(f"MESSAGE RCVD: {stdout} {stderr}") - async def spellcheck(self, message): - pipe = await self.pipe - return await pipe.write(message) - async def start(self): await self.session - async def compile_dictionary(self, dictionary): - words = ["asdfasfdafds", "cabbage"] + async def spellcheck(self, line): session = await self.session - for word in words: - response = await session(f"{word}\n".encode("utf-8")) - if str(response[0]).strip() == "*": - print(f"{word} is a good word") - else: - print(f"{word} is a bad word") + response = await session(f"{line}\n".encode("utf-8")) + if str(response[0]).strip() != "*": + return line async def stop(self): pass