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
def check_state_change(system, check):
"""Checks the state change for the respective system and check."""
select = check.select().where(check.system == system)
select = select.order_by(check.timestamp.desc()).limit(2)
try:
last, *previous = select
except ValueError:
raise NotChecked(system, check)
if previous:
previous, = previous
if last.successful and not previous.successful:
return CheckState(system, last, State.RECOVERED)
if previous.successful and not last.successful:
return CheckState(system, last, State.FAILED)
return CheckState(system, last, State.UNCHANGED)
if last.successful:
return CheckState(system, last, State.RECOVERED)
return CheckState(system, last, State.FAILED)
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Use one-element-tuple unpacking like
var, = var
Current behavior
Get warning
W0127: Assigning the same variable 'var' to itself (self-assigning-variable)
Expected behavior
Get no warning at all.
pylint --version output
Actual use case
Variable
previous
in the following example:The text was updated successfully, but these errors were encountered: