diff --git a/locust/rpc/protocol.py b/locust/rpc/protocol.py index a9c5769261..7f94485817 100644 --- a/locust/rpc/protocol.py +++ b/locust/rpc/protocol.py @@ -5,7 +5,7 @@ import msgpack try: - from bson import ObjectId # type: ignore + from bson import ObjectId except ImportError: class ObjectId: # type: ignore diff --git a/locust/runners.py b/locust/runners.py index 64ff8f063d..c54d35aade 100644 --- a/locust/runners.py +++ b/locust/runners.py @@ -345,10 +345,10 @@ def shape_worker(self) -> None: return elif self.shape_last_tick != current_tick: if len(current_tick) == 2: - user_count, spawn_rate = current_tick # type: ignore + user_count, spawn_rate = current_tick user_classes = None else: - user_count, spawn_rate, user_classes = current_tick # type: ignore + user_count, spawn_rate, user_classes = current_tick logger.info("Shape test updating to %d users at %.2f spawn rate" % (user_count, spawn_rate)) # TODO: This `self.start()` call is blocking until the ramp-up is completed. This can leads # to unexpected behaviours such as the one in the following example: diff --git a/locust/test/test_dispatch.py b/locust/test/test_dispatch.py index 0bd4979321..7b16fc3ac5 100644 --- a/locust/test/test_dispatch.py +++ b/locust/test/test_dispatch.py @@ -4129,7 +4129,7 @@ def _aggregate_dispatched_users(d: dict[str, dict[str, int]]) -> dict[str, int]: def _user_count(d: dict[str, dict[str, int]]) -> int: - return sum(map(sum, map(dict.values, d.values()))) # type: ignore + return sum(map(sum, map(dict.values, d.values()))) def _user_count_on_worker(d: dict[str, dict[str, int]], worker_node_id: str) -> int: