Summary
When combined with some other formatting fix, this one is still consistent .. but hardly ever helpful:
ruff check --diff --no-fix --fix --isolated --stdin-filename="r.pyi" --select=PYI020,F821 -- <<<'v: Literal["return", "0o7", "0*3", "int", "foo"]'
--- r.pyi
+++ r.pyi
@@ -1 +1 @@
-v: Literal["return", "0o7", "0*3", "int", "foo"]
+v: Literal["return", 0o7, 0*3, int, foo]
Would fix 4 errors.
NB: Selected F821 only to showcase what is going on. Nothing special about that, just happens to match one case where PYI020 cannot be positively confirmed to be safe to apply.