From 69afca435b271b42a341730802467bacf88fa444 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 19 Mar 2026 12:00:33 +1100 Subject: Remove unnecessary readlines and make FindCredits same as SciTE. --- scripts/GenerateCharacterCategory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/GenerateCharacterCategory.py') diff --git a/scripts/GenerateCharacterCategory.py b/scripts/GenerateCharacterCategory.py index 806dea2fe..1080cceed 100644 --- a/scripts/GenerateCharacterCategory.py +++ b/scripts/GenerateCharacterCategory.py @@ -2,7 +2,7 @@ # Script to generate scintilla/src/CharacterCategoryMap.cxx and lexilla/lexlib/CharacterCategory.cxx # from Python's Unicode data # Should be run rarely when a Python with a new version of Unicode data is available. -# Requires Python 3.3 or later +# Requires Python 3.6 or later # Should not be run with old versions of Python. import pathlib, platform, sys, unicodedata @@ -11,7 +11,7 @@ from FileGenerator import Regenerate def findCategories(filename): with filename.open(encoding="UTF-8") as infile: - lines = [x.strip() for x in infile.readlines() if "\tcc" in x] + lines = [x.strip() for x in infile if "\tcc" in x] values = "".join(lines).replace(" ","").split(",") print("Categrories:", values) return [v[2:] for v in values] -- cgit v1.2.3