reformatting
formatting_check / formatting_check (push) Failing after 3s
Python Test / test (.ps1, windows-latest, 3.9) (push) Has been cancelled
Python Test / test (.sh, macos-latest, 3.9) (push) Has been cancelled
Python Test / test (.sh, ubuntu-latest, 3.9) (push) Has been cancelled

This commit is contained in:
2026-07-14 21:32:55 +12:00
parent 3d0658b483
commit 0157f462cc
17 changed files with 439 additions and 377 deletions
+19 -3
View File
@@ -245,10 +245,26 @@ class FileNameFormatter:
if ord(char) < 0x80:
result.append(char)
# Keep common Unicode letters, numbers, and punctuation
elif unicodedata.category(char) in ['Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nd', 'Nl', 'No', 'Pc', 'Pd', 'Ps', 'Pe', 'Pi', 'Pf', 'Po']:
elif unicodedata.category(char) in [
"Lu",
"Ll",
"Lt",
"Lm",
"Lo",
"Nd",
"Nl",
"No",
"Pc",
"Pd",
"Ps",
"Pe",
"Pi",
"Pf",
"Po",
]:
result.append(char)
# Strip emoji, symbols, and other special characters that cause 8.3 names
elif unicodedata.category(char).startswith(('S', 'So', 'Sk', 'Sm')): # Symbols
elif unicodedata.category(char).startswith(("S", "So", "Sk", "Sm")): # Symbols
continue
elif ord(char) > 0x1F000: # High Unicode ranges often contain emoji
continue
@@ -256,7 +272,7 @@ class FileNameFormatter:
# Keep other Unicode characters that are generally safe
result.append(char)
return ''.join(result)
return "".join(result)
@staticmethod
def _strip_emojis(input_string: str) -> str: