speedgolf

in some envs (unsure which), importlib.resources is an
expensive import; drop it when we know it's useless
This commit is contained in:
ed 2025-04-07 20:34:55 +00:00
parent 21db8833dc
commit b2aaf40a3e
6 changed files with 13 additions and 1 deletions

View file

@ -84,6 +84,9 @@ def uh2(fp):
if " # !rm" in ln:
continue
if ln.endswith("TYPE_CHECKING"):
ln = ln.replace("from typing import TYPE_CHECKING", "TYPE_CHECKING = False")
lns.append(ln)
cs = "\n".join(lns)