Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/install_requirements/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ runs:
shell: bash

- name: Upload lockfiles
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: lockfiles
path: lockfiles
Expand Down
3 changes: 1 addition & 2 deletions examples/devices/counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ class CounterDevice(Device):
"""A simple device which increments a value."""

#: An empty typed mapping of input values
class Inputs(TypedDict):
...
class Inputs(TypedDict): ...

#: A typed mapping containing the 'value' output value
class Outputs(TypedDict):
Expand Down
6 changes: 2 additions & 4 deletions examples/devices/isolated_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ class IsolatedBoxDevice(Device):
The device has no inputs or outputs and interacts solely through adapters.
"""

class Inputs(TypedDict):
...
class Inputs(TypedDict): ...

class Outputs(TypedDict):
...
class Outputs(TypedDict): ...

def __init__(self, initial_value: float = 2) -> None:
"""Constructor which configures the initial value
Expand Down
3 changes: 1 addition & 2 deletions examples/devices/remote_controlled.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ class RemoteControlledDevice(Device):
"""A trivial toy device which is controlled by an adapter."""

#: An empty typed mapping of device inputs
class Inputs(TypedDict):
...
class Inputs(TypedDict): ...

#: A typed mapping containing the 'observed' output value
class Outputs(TypedDict):
Expand Down
9 changes: 3 additions & 6 deletions examples/devices/trampoline.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ class TrampolineDevice(Device):
"""A trivial toy device which requests a callback every update."""

#: An empty typed mapping of device inputs
class Inputs(TypedDict):
...
class Inputs(TypedDict): ...

#: An empty typed mapping of device outputs
class Outputs(TypedDict):
...
class Outputs(TypedDict): ...

def __init__(self, callback_period: int = int(1e9)) -> None:
"""A constructor of the sink which configures the device callback period.
Expand Down Expand Up @@ -58,8 +56,7 @@ class RandomTrampolineDevice(Device):
"""A trivial toy device which produced a random output and requests a callback."""

#: An empty typed mapping of device inputs
class Inputs(TypedDict):
...
class Inputs(TypedDict): ...

#: A typed mapping containing the 'output' output value
class Outputs(TypedDict):
Expand Down
3 changes: 1 addition & 2 deletions src/tickit/adapters/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ def get_endpoints(self) -> Iterable[Tuple[HttpEndpoint, Callable]]:
if endpoint is not None and isinstance(endpoint, HttpEndpoint):
yield endpoint, func

def after_update(self) -> None:
...
def after_update(self) -> None: ...
3 changes: 1 addition & 2 deletions src/tickit/adapters/io/zeromq_push_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@

@runtime_checkable
class SocketFactory(Protocol):
async def __call__(self, __host: str, __port: int) -> aiozmq.ZmqStream:
...
async def __call__(self, __host: str, __port: int) -> aiozmq.ZmqStream: ...


async def create_zmq_push_socket(host: str, port: int) -> aiozmq.ZmqStream:
Expand Down
3 changes: 1 addition & 2 deletions src/tickit/adapters/tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ class CommandAdapter(Interpreter[AnyStr]):
def byte_format(self) -> ByteFormat:
return self._byte_format

def after_update(self) -> None:
...
def after_update(self) -> None: ...

async def handle_message(
self,
Expand Down
3 changes: 1 addition & 2 deletions src/tickit/adapters/zmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def add_message_to_stream(self, message: ZeroMqMessage) -> None:
async def next_message(self) -> ZeroMqMessage:
return await self._ensure_queue().get()

def after_update(self) -> None:
...
def after_update(self) -> None: ...

def _ensure_queue(self) -> asyncio.Queue:
if self._message_queue is None:
Expand Down
3 changes: 1 addition & 2 deletions src/tickit/core/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ class AdapterIo(ABC, Generic[A]):
"""Io logic with a setup method for an adapter object."""

@abstractmethod
async def setup(self, adapter: A, raise_interrupt: RaiseInterrupt) -> None:
...
async def setup(self, adapter: A, raise_interrupt: RaiseInterrupt) -> None: ...


class AdapterContainer(Generic[A]):
Expand Down
6 changes: 3 additions & 3 deletions src/tickit/core/management/schedulers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ async def setup(self) -> None:
await self.state_consumer.subscribe(
{output_topic(component) for component in self.ticker.components}
)
self.state_producer: StateProducer[
Union[ComponentInput, Skip]
] = self._state_producer_cls()
self.state_producer: StateProducer[Union[ComponentInput, Skip]] = (
self._state_producer_cls()
)

def add_wakeup(self, component: ComponentID, when: SimTime) -> None:
"""Adds a wakeup to the mapping.
Expand Down
3 changes: 1 addition & 2 deletions src/tickit/devices/sink.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class Inputs(TypedDict):
input: Any

#: An empty typed mapping of device outputs
class Outputs(TypedDict):
...
class Outputs(TypedDict): ...

def update(self, time: SimTime, inputs: Inputs) -> DeviceUpdate[Outputs]:
"""The update method which logs the inputs and produces no outputs.
Expand Down
3 changes: 1 addition & 2 deletions src/tickit/devices/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ class SourceDevice(Device):
"""A simple device which produces a pre-configured value."""

#: An empty typed mapping of device inputs
class Inputs(TypedDict):
...
class Inputs(TypedDict): ...

#: A typed mapping containing the 'value' output value
class Outputs(TypedDict):
Expand Down
Loading