]> git.madduck.net Git - etc/vim.git/blobdiff - src/blib2to3/pgen2/literals.py

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Fix crash on type comment with trailing space (#3773)
[etc/vim.git] / src / blib2to3 / pgen2 / literals.py
index b5fe42851148e7fd6270ae728a0327f1523dd4b5..c67b91d046368e91b4adf686fd142a7479483235 100644 (file)
@@ -5,10 +5,10 @@
 
 import re
 
-from typing import Dict, Match, Text
+from typing import Dict, Match
 
 
-simple_escapes: Dict[Text, Text] = {
+simple_escapes: Dict[str, str] = {
     "a": "\a",
     "b": "\b",
     "f": "\f",
@@ -22,7 +22,7 @@ simple_escapes: Dict[Text, Text] = {
 }
 
 
-def escape(m: Match[Text]) -> Text:
+def escape(m: Match[str]) -> str:
     all, tail = m.group(0, 1)
     assert all.startswith("\\")
     esc = simple_escapes.get(tail)
@@ -44,7 +44,7 @@ def escape(m: Match[Text]) -> Text:
     return chr(i)
 
 
-def evalString(s: Text) -> Text:
+def evalString(s: str) -> str:
     assert s.startswith("'") or s.startswith('"'), repr(s[:1])
     q = s[0]
     if s[:3] == q * 3: