summaryrefslogtreecommitdiffstats
path: root/tools/hacking.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/hacking.py')
-rwxr-xr-xtools/hacking.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/hacking.py b/tools/hacking.py
index b924167f5..2d8ce92bc 100755
--- a/tools/hacking.py
+++ b/tools/hacking.py
@@ -283,10 +283,12 @@ def check_i18n():
"""
while True:
try:
- token_type, text, _, _, _ = yield
+ token_type, text, _, _, line = yield
except GeneratorExit:
return
- if token_type == tokenize.NAME and text == "_":
+ if (token_type == tokenize.NAME and text == "_" and
+ not line.startswith('def _(msg):')):
+
while True:
token_type, text, start, _, _ = yield
if token_type != tokenize.NL: