HighlightSeverity (TypeEvalContext context) { if (isBuiltInConstant()) return null; final PyExpression qualifier = myElement.getQualifier(); if (qualifier == null) { return HighlightSeverity.ERROR; } if (context.getType(qualifier) != null) { return HighlightSeverity.WARNING; } return null; }