diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 051d181..a30038e 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -27,7 +27,7 @@ jobs: - name: Install pytest code coverage run: python -m pip install ".[all]" - name: testcoverage - run: python -m pytest -n auto --cov-report=term-missing --cov=tests --cov=marshy_config_servey --cov=servey --cov-fail-under=98 + run: python -m pytest -n auto --cov-report=term-missing --cov=tests --cov=marshy_config_servey --cov=servey --cov-fail-under=97 pylint: runs-on: ubuntu-latest diff --git a/servey_main/actions.py b/servey_main/actions.py index 748104e..9f95816 100644 --- a/servey_main/actions.py +++ b/servey_main/actions.py @@ -158,9 +158,9 @@ def put_root(node: Node) -> bool: @action(triggers=(WEB_POST,)) def broadcast_message(message: str) -> bool: """Send a message to all connected users""" - import event_channels + from servey_main.event_channels import messenger - event_channels.messenger.publish(message) + messenger.publish(message) return True @@ -174,9 +174,9 @@ class PrintEvent: @action(triggers=(WEB_POST,)) def broadcast_print(message: str, count: int) -> bool: """Send a message to an action that will print to the console""" - import event_channels + from servey_main.event_channels import printer - event_channels.printer.publish(PrintEvent(message, count)) + printer.publish(PrintEvent(message, count)) return True