Skip to content

Commit

Permalink
fix: MutableSequence typing
Browse files Browse the repository at this point in the history
  • Loading branch information
engnadeau committed Aug 23, 2022
1 parent ff50e5e commit f5ac85a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pybotics/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
from copy import deepcopy
from itertools import repeat
from typing import Sequence, Union
from typing import Sequence, Union, MutableSequence

import attr
import numpy as np # type: ignore
Expand All @@ -16,8 +16,8 @@


def _validate_transform_mask(
mask: Union[bool, Sequence[bool]], name: str, size: int
) -> Sequence[bool]:
mask: MutableSequence[bool], name: str, size: int
) -> MutableSequence[bool]:
"""Validate mask arguments."""
# validate input
if isinstance(mask, bool):
Expand All @@ -33,9 +33,9 @@ class OptimizationHandler:
"""Handler for optimization tasks."""

robot = attr.ib(type=Robot)
kinematic_chain_mask = attr.ib(False, type=Union[bool, Sequence[bool]])
tool_mask = attr.ib(False, type=Union[bool, Sequence[bool]])
world_mask = attr.ib(False, type=Union[bool, Sequence[bool]])
kinematic_chain_mask = attr.ib(False, type=MutableSequence[bool])
tool_mask = attr.ib(False, type=MutableSequence[bool])
world_mask = attr.ib(False, type=MutableSequence[bool])

def __attrs_post_init__(self) -> None:
"""Post-init handler."""
Expand Down

0 comments on commit f5ac85a

Please sign in to comment.