Skip to content

Commit

Permalink
rm more deprecated mypy ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
tdadela committed Apr 19, 2024
1 parent 15a4417 commit 05964c1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion locust/rpc/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import msgpack

try:
from bson import ObjectId # type: ignore
from bson import ObjectId
except ImportError:

class ObjectId: # type: ignore
Expand Down
4 changes: 2 additions & 2 deletions locust/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion locust/test/test_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 05964c1

Please sign in to comment.