Open tyge68 opened 1 month ago
If anyone has ideas why Mypy step fails, the error seems unrelated to the change, at least the line for which the error is triggered wasn't updated by this PR at all.
Does mypy (using 1.11.2) work for you locally?
@cyberw no it seems to be the same issue, it's really not clear why this tool is failing especially as those lines are not touched by this PR
Not sure what the typing issue is, but passing the whole environment into the RequestsStats constructor is awkward. Maybe just pass the exclude_from_aggregation regex?
@cyberw thanks for your feedback, I have updated it now and also changed to allow setting that via command arguments. Still the same Mypy is happening which is really unclear. I am not too familiar with that tool and what is the purpose of it, why it fails etc... might be worth checking with Mypy experts.
Can you try grabbing this change: https://github.com/locustio/locust/commit/74d5de457fb68a26fe49670aec98e26feccead6b
It seems to have been a "real" issue with the type hints in the code, but I still don't understand why your PR exposed it :)
Here is a sample implementation allowing to set the
--exclude-from-aggregation
argument option.locust --exclude-from-aggregation "CUSTOM"
Note:
environment.stats
object property exclude_from_aggregation