Skip to content

Commit

Permalink
Remove old odd chars code, which accidentally got included
Browse files Browse the repository at this point in the history
  • Loading branch information
martinburchell committed Jan 2, 2025
1 parent cbdb4ba commit 1cabfb4
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions crate_anon/anonymise/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,6 @@

MAX_PID_STR = "9" * 10 # e.g. NHS numbers are 10-digit

# Better overall than string.maketrans:
ODD_CHARS_TRANSLATE = [chr(x) for x in range(0, 256)]
for c in "()/ ":
ODD_CHARS_TRANSLATE[ord(c)] = "_"
for i in range(0, 32):
ODD_CHARS_TRANSLATE[i] = "_"
for i in range(127, 256):
ODD_CHARS_TRANSLATE[i] = "_"
ODD_CHARS_TRANSLATE = "".join(ODD_CHARS_TRANSLATE)

TridType = Integer
MAX_TRID = 2**31 - 1
# https://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html
Expand Down

0 comments on commit 1cabfb4

Please sign in to comment.