invalid-unary-operand-type / E1130#

Message emitted:

%s

Description:

Emitted when a unary operand is used on an object which does not support this type of operation.

Correct code:

cherries = 10
eaten_cherries = 2
cherries -= eaten_cherries

Problematic code:

cherries = 10
eaten_cherries = int
cherries = - eaten_cherries  # [invalid-unary-operand-type]

Created by the typecheck checker.