diff options
author | Brian <mofosyne@gmail.com> | 2024-05-05 15:07:48 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-05 08:07:48 +0300 |
commit | 6fbd43221167bf96112f899daf22c127b282cbcf (patch) | |
tree | 46a6c8d157adc202f7ac9fa46b85f5df50618c15 /scripts/gen-unicode-data.py | |
parent | 842500144ee02c8b0a46d2cc43880f8d80998fa5 (diff) |
py : logging and flake8 suppression refactoring (#7081)
Set one as executable and add basicConfig()
to another. Also added noqa tag to test scripts.
Diffstat (limited to 'scripts/gen-unicode-data.py')
-rw-r--r-- | scripts/gen-unicode-data.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/gen-unicode-data.py b/scripts/gen-unicode-data.py index d49cbf2a..977e6561 100644 --- a/scripts/gen-unicode-data.py +++ b/scripts/gen-unicode-data.py @@ -41,20 +41,20 @@ def get_matches(regex_expr): def print_cat(cat, ranges): - print("const std::vector<std::pair<uint32_t, uint32_t>> unicode_ranges_{} = {{".format(cat)) + print("const std::vector<std::pair<uint32_t, uint32_t>> unicode_ranges_{} = {{".format(cat)) # noqa: NP100 cnt = 0 for start, end in ranges: if cnt % 4 != 0: - print(" ", end="") - print("{{0x{:08X}, 0x{:08X}}},".format(start, end), end="") + print(" ", end="") # noqa: NP100 + print("{{0x{:08X}, 0x{:08X}}},".format(start, end), end="") # noqa: NP100 if cnt % 4 == 3: - print("") + print("") # noqa: NP100 cnt += 1 if cnt % 4 != 0: - print("") - print("};") - print("") + print("") # noqa: NP100 + print("};") # noqa: NP100 + print("") # noqa: NP100 print_cat("number", get_matches(r'\p{N}')) |