Skip to content

Commit d2dfad4

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 99ce9fe commit d2dfad4

File tree

16 files changed

+65
-34
lines changed

16 files changed

+65
-34
lines changed

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
-- Project information -----------------------------------------------------
77
https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
88
"""
9+
910
import os
1011
import sys
1112
from re import Match, match

tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Pytest package for testing uoshardware."""
2+
23
from dataclasses import dataclass
34

45

tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module for package test configuration, scope=session."""
2+
23
import pytest
34

45
from uoshardware import Loading

tests/interface/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module used for fixture initialisation in interface tests."""
2+
23
import pytest
34

45

tests/interface/test_package.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module for testing the interface package."""
2+
23
from time import sleep
34

45
import pytest

tests/test_abstractions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Unit tests for the `abstractions` module."""
2+
23
import pytest
34

45
from tests import Packet

tests/test_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Unit tests for the api module."""
2+
23
from inspect import signature
34

45
import pytest

tests/test_devices.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for the devices module."""
2+
23
import pytest
34

45
from uoshardware import UOSUnsupportedError

uoshardware/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The high level interface for communicating with UOS devices."""
2+
23
import logging
34
from enum import Enum
45

uoshardware/abstractions.py

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module defining the base class and static func for interfaces."""
2+
23
from abc import ABCMeta, abstractmethod
34
from dataclasses import dataclass, field
45
from datetime import datetime
@@ -182,12 +183,13 @@ class UOSInterface(metaclass=ABCMeta):
182183
def execute_instruction(self, packet: NPCPacket) -> ComResult: # dead: disable
183184
"""Abstract method for executing instructions on UOSInterfaces.
184185
185-
:param packet: A tuple containing the uint8 npc packet for the UOS instruction.
186+
:param packet: A tuple containing the uint8 npc packet for the
187+
UOS instruction.
186188
:returns: ComResult object.
187189
:raises: UOSUnsupportedError if the interface hasn't been built
188-
correctly.
190+
correctly.
189191
:raises: UOSCommunicationError if there is a problem completing
190-
the action.
192+
the action.
191193
"""
192194
raise UOSUnsupportedError(
193195
"UOSInterfaces must over-ride "
@@ -201,12 +203,13 @@ def read_response(
201203
"""Read ACK and Data packets from a UOSInterface.
202204
203205
:param expect_packets: How many packets including ACK to expect
204-
:param timeout_s: The maximum time this function will wait for data.
206+
:param timeout_s: The maximum time this function will wait for
207+
data.
205208
:return: COM Result object.
206209
:raises: UOSUnsupportedError if the interface hasn't been built
207-
correctly.
210+
correctly.
208211
:raises: UOSCommunicationError if there is a problem completing
209-
the action.
212+
the action.
210213
"""
211214
raise UOSUnsupportedError(
212215
"UOSInterfaces must over-ride "
@@ -219,9 +222,9 @@ def hard_reset(self) -> ComResult:
219222
220223
:return: COM Result object.
221224
:raises: UOSUnsupportedError if the interface hasn't been built
222-
correctly.
225+
correctly.
223226
:raises: UOSCommunicationError if there is a problem completing
224-
the action.
227+
the action.
225228
"""
226229
raise UOSUnsupportedError(
227230
"UOSInterfaces must over-ride "
@@ -233,9 +236,9 @@ def open(self):
233236
"""Abstract method for opening a connection to a UOSInterface.
234237
235238
:raises: UOSUnsupportedError if the interface hasn't been built
236-
correctly.
239+
correctly.
237240
:raises: UOSCommunicationError if there is a problem completing
238-
the action.
241+
the action.
239242
"""
240243
raise UOSUnsupportedError(
241244
"UOSInterfaces must over-ride " f"{UOSInterface.open.__name__} prototype."
@@ -246,9 +249,9 @@ def close(self):
246249
"""Abstract method for closing a connection to a UOSInterface.
247250
248251
:raises: UOSUnsupportedError if the interface hasn't been built
249-
correctly.
252+
correctly.
250253
:raises: UOSCommunicationError if there is a problem completing
251-
the action.
254+
the action.
252255
"""
253256
raise UOSUnsupportedError(
254257
"UOSInterfaces must over-ride " f"{UOSInterface.close.__name__} prototype."
@@ -260,7 +263,7 @@ def is_active(self) -> bool:
260263
261264
:return: Success boolean.
262265
:raises: UOSUnsupportedError if the interface hasn't been built
263-
correctly.
266+
correctly.
264267
"""
265268
raise UOSUnsupportedError(
266269
"UOSInterfaces must over-ride " f"{UOSInterface.close.__name__} prototype."
@@ -273,7 +276,7 @@ def enumerate_devices() -> list:
273276
274277
:return: A list of possible UOSInterfaces on the server.
275278
:raises: UOSUnsupportedError if the interface hasn't been built
276-
correctly.
279+
correctly.
277280
"""
278281
raise UOSUnsupportedError(
279282
"UOSInterfaces must over-ride "

0 commit comments

Comments
 (0)