class documentation
class NoneConstraint(Constraint): (source)
Represents an "is None" or "is not None" constraint.
Class Method | match |
Return a new constraint for node matched from expr, if expr matches the constraint pattern. |
Method | satisfied |
Return True if this constraint is satisfied by the given inferred value. |
Constant | CONST |
Undocumented |
Inherited from Constraint
:
Method | __init__ |
Undocumented |
Instance Variable | negate |
True if this constraint is negated. E.g., "is not" instead of "is". |
Instance Variable | node |
The node that this constraint applies to. |
@classmethod
def match(cls:
def match(cls:
type[ Self]
, node: _NameNodes
, expr: nodes.NodeNG
, negate: bool
= False) -> Self|None
:
(source)
¶
overrides
astroid.constraint.Constraint.match
Return a new constraint for node matched from expr, if expr matches the constraint pattern. Negate the constraint based on the value of negate.