mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-26 21:14:19 +00:00
⬆ Bump version to 6.2.1
This commit is contained in:
parent
0967ae3293
commit
698643e927
3 changed files with 10 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
[tool.poetry]
|
||||
name = "royalnet"
|
||||
version = "6.2.0"
|
||||
version = "6.2.1"
|
||||
description = "A multipurpose bot framework"
|
||||
authors = ["Stefano Pigozzi <me@steffo.eu>"]
|
||||
license = "AGPL-3.0-or-later"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
This module contains the base :class:`.PDA` class.
|
||||
"""
|
||||
|
||||
import abc
|
||||
import asyncio
|
||||
import royalnet.royaltyping as t
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
|
@ -10,7 +10,7 @@ if t.TYPE_CHECKING:
|
|||
DispenserKey = t.TypeVar("DispenserKey")
|
||||
|
||||
|
||||
class PDA(metaclass=abc.ABCMeta):
|
||||
class PDA:
|
||||
"""
|
||||
.. todo:: Document this.
|
||||
"""
|
||||
|
@ -27,6 +27,9 @@ class PDA(metaclass=abc.ABCMeta):
|
|||
def __len__(self):
|
||||
return len(self.implementations)
|
||||
|
||||
def run(self):
|
||||
asyncio.run(asyncio.gather(*[implementation.run() for implementation in self.implementations.values()]))
|
||||
|
||||
|
||||
__all__ = (
|
||||
"PDA",
|
||||
|
|
|
@ -63,6 +63,10 @@ class PDAImplementation(metaclass=abc.ABCMeta):
|
|||
|
||||
raise NotImplementedError()
|
||||
|
||||
@abc.abstractmethod
|
||||
async def run(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
class ImplementationException(Exception):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue