Skip to content

Commit c9ea647

Browse files
committed
Fixed hints
1 parent e45599d commit c9ea647

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

LocalizationMappingTable.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import platform
22
import re
3+
from pathlib import Path
34

45

5-
def FillLocalizationMappingTable (devKitPath) -> str:
6+
def FillLocalizationMappingTable (devKitPath: Path) -> dict[str, str]:
67
# Dynamically generate a mapping table from GSLocalization.h
78
pattern = None
89
system = platform.system ()
@@ -17,8 +18,5 @@ def FillLocalizationMappingTable (devKitPath) -> str:
1718
with open(gsLocalizationPath, 'r', encoding='utf-8') as f:
1819
gsLocalizationContent = f.read ()
1920

20-
if not pattern:
21-
return {}
22-
2321
patternRegex = re.compile (pattern, re.MULTILINE)
2422
return { m.group(1): m.group(2) for m in patternRegex.finditer (gsLocalizationContent) }

0 commit comments

Comments
 (0)