Browse Source

Some cleanup; upgrade docker OS.

scossu 1 year ago
parent
commit
cc11c892e6
3 changed files with 1 additions and 19 deletions
  1. 1 1
      Dockerfile
  2. 0 17
      scriptshifter/hooks/general/__init__.py
  3. 0 1
      scriptshifter/tables/__init__.py

+ 1 - 1
Dockerfile

@@ -1,4 +1,4 @@
-FROM python:3.10-slim-bullseye
+FROM python:3.10-slim-bookworm
 
 RUN apt update
 RUN apt install -y build-essential tzdata gfortran libopenblas-dev libboost-all-dev

+ 0 - 17
scriptshifter/hooks/general/__init__.py

@@ -8,19 +8,6 @@ from re import compile
 from scriptshifter.trans import MULTI_WS_RE
 
 
-NORM_MAP = (
-    (" .", "."),
-    (" ;", ";"),
-    (" ,", ","),
-    ("( ", "("),
-    ("[ ", "["),
-    ("{ ", "{"),
-    (" )", ")"),
-    (" ]", "]"),
-    (" }", "}"),
-    ("- -", "--"),
-)
-
 NORM1_RE = compile(r"([.,;:\)\]}])\s")
 NORM2_RE = compile(r"(\S)([.,;:\)\]}])")
 NORM3_RE = compile(r"\s([\)\]\}])")
@@ -41,8 +28,4 @@ def normalize_spacing_post_assembly(ctx):
     norm = NORM3_RE.sub(r"\1", norm)
     norm = NORM4_RE.sub(r"\1 \2", norm)
 
-    # Normalize spacing around punctuation and parentheses.
-    for a, b in NORM_MAP:
-        norm = norm.replace(a, b)
-
     return norm

+ 0 - 1
scriptshifter/tables/__init__.py

@@ -28,7 +28,6 @@ TABLE_DIR = environ.get("TXL_CONFIG_TABLE_DIR", DEFAULT_TABLE_DIR)
 
 # Available hook names.
 HOOKS = (
-    "pre_config",
     "post_config",
     "post_normalize",
     "begin_input_token",