diff --git a/.gitignore b/.gitignore index bf7ff1a..1d164cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # python stuff -*/__pycache__/ +__pycache__/ # venv stuff bin/ diff --git a/example.py b/example.py deleted file mode 100644 index 97aff03..0000000 --- a/example.py +++ /dev/null @@ -1,26 +0,0 @@ -import yyb - -class MyClient(yyb.Client): - async def on_join(self, room): - await room.say("Hello!") - - async def on_message(self, message): - if message.content == "reply to me"): - reply = await message.reply("reply") - await reply.reply("reply to the reply") - await message.room.say("stuff going on") - - elif message.content == "hey, join &test!": - # returns room in phase 3, or throws JoinException - room = await self.join("test") - if room: - room.say("hey, I joined!") - else: - message.reply("didn't work :(") - - async def before_part(self, room): - await room.say("Goodbye!") - -# Something like this, I guess. It's still missing password fields though. -c = MyClient("my:bot:") -c.run("test", "bots") diff --git a/info.txt b/info.txt deleted file mode 100644 index f33cfb7..0000000 --- a/info.txt +++ /dev/null @@ -1,39 +0,0 @@ -Signature of a normal function: - -def a(b: int, c: str) -> bool: - pass - -a # type: Callable[[int, str], bool] - -Signature of an async function: - -async def a(b: int, c: str) -> bool: - pass - -a # type: Callable[[int, str], Awaitable[bool]] - - - -Enable logging (from the websockets docs): - -import logging -logger = logging.getLogger('websockets') -logger.setLevel(logging.INFO) -logger.addHandler(logging.StreamHandler()) - -Output format: See https://docs.python.org/3/library/logging.html#formatter-objects - -Example formatting: - -FORMAT = "{asctime} [{levelname:<7}] <{name}> {funcName}(): {message}" -DATE_FORMAT = "%F %T" -handler = logging.StreamHandler() -handler.setFormatter(logging.Formatter( - fmt=FORMAT, - datefmt=DATE_FORMAT, - style="{" -)) - -logger = logging.getLogger('yaboli') -logger.setLevel(logging.DEBUG) -logger.addHandler(handler) diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 4789da4..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -websockets==7.0