Exclude commented out strings
This commit is contained in:
+4
-2
@@ -280,8 +280,10 @@ def find_used_string_keys(
|
|||||||
text = f.read_text(encoding="utf-8", errors="replace")
|
text = f.read_text(encoding="utf-8", errors="replace")
|
||||||
except OSError:
|
except OSError:
|
||||||
continue
|
continue
|
||||||
for m in pattern.finditer(text):
|
for line in text.splitlines():
|
||||||
used.add(m.group(0))
|
line = line.split("//", 1)[0]
|
||||||
|
for m in pattern.finditer(line):
|
||||||
|
used.add(m.group(0))
|
||||||
|
|
||||||
return used
|
return used
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user