Skip to content

Commit

Permalink
Merge pull request #2978 from tdadela/update-ruff-mypy
Browse files Browse the repository at this point in the history
Update ruff mypy
  • Loading branch information
cyberw authored Nov 9, 2024
2 parents f858c0e + 15117e0 commit 6b40e26
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 121 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.7 # Pin the same version in the pyproject.toml file
rev: v0.7.3 # Pin the same version in the pyproject.toml file
hooks:
# Run the linter.
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion locust/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def greenlet_exception_logger(logger, level=logging.CRITICAL):
"""

def exception_handler(greenlet):
if greenlet.exc_info[0] == SystemExit:
if greenlet.exc_info[0] is SystemExit:
logger.log(
min(logging.INFO, level), # dont use higher than INFO for this, because it sounds way to urgent
f"sys.exit({greenlet.exc_info[1]}) called (use log level DEBUG for callstack)",
Expand Down
2 changes: 1 addition & 1 deletion locust/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def stop_users(self, user_classes_stop_count: dict[str, int]) -> None:
"While stopping users, we encountered a user that didn't have proper args %s", user_greenlet
)
continue
if type(user) == self.user_classes_by_name[user_class]:
if type(user) is self.user_classes_by_name[user_class]:
to_stop.append(user)

if not to_stop:
Expand Down
Loading

0 comments on commit 6b40e26

Please sign in to comment.