You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the documentation it becomes clear that this code is only executed when debugging is enabled.
When executed with the -O argument, assert statements are typically completely disabled.
fix
replace assert with proper check + exceptions.
The text was updated successfully, but these errors were encountered:
assertself._connect_task, "Connect task not created, this shouldn't happen"
In this case the logic will always set self._connect_task, but the conditionals are too complicated for the type checker to infer this. The assert statement is then really for the benefit of the type checker. I seem to have picked up this habit from the mypy cheat sheet. Would you rewrite this statement with a check and raise?
It appears that
assert
is used in core methods.Why is this problematic?
From the documentation it becomes clear that this code is only executed when debugging is enabled.
When executed with the
-O
argument,assert
statements are typically completely disabled.fix
replace
assert
with proper check + exceptions.The text was updated successfully, but these errors were encountered: