As `def xxx() -> str:`, code highlight whill be display error when I use `->`

[![enter image description here](https://i.stack.imgur.com/e52jt.png)](https://i.stack.imgur.com/e52jt.png)

It's not a bug of the theme

If it can be solved by setting rules, can you help me solve it? Or a bug?