6. $|z|=1$, then the maximum value of $\left|z^{2}-z+2\right|$ is



Translate the above text into English, please keep the original text's line breaks and format, and output the translation result directly. 

However, it seems the translation request was already fulfilled as provided. If you need the solution to the problem in English, please let me know!
6. $4\left|z^{2}-z+2\right| \leqslant|z|^{2}+|z|+2=4$, when $z=-1$, equality holds.