Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
rowleya committed Nov 10, 2023
1 parent e769762 commit f531dd8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions spinnman/processes/abstract_multi_connection_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import sys
from types import TracebackType
from typing import (
Callable, Dict, Generator, Generic, List, Optional, TypeVar, cast)
Callable, Dict, Generator, Generic, List, Optional, TypeVar, cast, Set)
from typing_extensions import Self, TypeAlias
from spinn_utilities.log import FormatAdapter
from spinnman.connections import SCPRequestPipeLine
Expand Down Expand Up @@ -62,7 +62,7 @@ class AbstractMultiConnectionProcess(Generic[R]):
def __init__(self, next_connection_selector: ConnectionSelector,
n_retries: int = N_RETRIES, timeout: float = SCP_TIMEOUT,
n_channels: int = 8, intermediate_channel_waits: int = 7,
non_fail_retry_codes: Optional[set(SCPResult)] = None):
non_fail_retry_codes: Optional[Set[SCPResult]] = None):
"""
:param ConnectionSelector next_connection_selector:
How to choose the connection.
Expand All @@ -77,7 +77,7 @@ def __init__(self, next_connection_selector: ConnectionSelector,
:param int intermediate_channel_waits:
The maximum number of outstanding message/reply pairs to have on a
particular connection. Passed to :py:class:`SCPRequestPipeLine`
:param Optional[set(SCPResult)] non_fail_retry_codes:
:param Optional[Set[SCPResult]] non_fail_retry_codes:
Optional set of responses that result in retry but after retrying
don't then result in failure even if returned on the last call.
"""
Expand Down
6 changes: 3 additions & 3 deletions spinnman/processes/send_single_command_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Generic, Optional, TypeVar
from typing import Generic, Optional, TypeVar, Set
from .abstract_multi_connection_process import AbstractMultiConnectionProcess
from spinnman.constants import SCP_TIMEOUT
from spinnman.messages.scp.abstract_messages import AbstractSCPResponse
Expand All @@ -32,7 +32,7 @@ class SendSingleCommandProcess(AbstractMultiConnectionProcess, Generic[R]):

def __init__(self, connection_selector: ConnectionSelector,
n_retries: int = 3, timeout: float = SCP_TIMEOUT,
non_fail_retry_codes: Optional[set(SCPResult)] = None):
non_fail_retry_codes: Optional[Set[SCPResult]] = None):
"""
:param ConnectionSelector connection_selector:
:param int n_retries:
Expand All @@ -41,7 +41,7 @@ def __init__(self, connection_selector: ConnectionSelector,
:param float timeout:
The timeout, in seconds. Passed to
:py:class:`SCPRequestPipeLine`
:param Optional[set(SCPResult)] non_fail_retry_codes:
:param Optional[Set[SCPResult]] non_fail_retry_codes:
Optional set of responses that result in retry but after retrying
don't then result in failure even if returned on the last call.
"""
Expand Down

0 comments on commit f531dd8

Please sign in to comment.