GenerateUUID icon indicating copy to clipboard operation
GenerateUUID copied to clipboard

The `uuid1s`/`uuids` variants raise NameError: `re` is not imported

Open dpc00 opened this issue 2 months ago • 1 comments

In generate_uuid.py (lines 58-61):

elif prefix == 'uuid1s':
    val = re.sub('-', '', str(uuid.uuid1()))
elif prefix == 'uuids':
    val = re.sub('-', '', str(uuid.uuid4()))

The module imports only sublime, sublime_plugin and uuid; re is not imported (ruff F821), so the two "short UUID" completions raise NameError: name 're' is not defined.

Fix: add import re (or use str(uuid.uuid4()).replace('-', '')).

Found while testing packages from the Package Control catalog (static analysis with ruff plus source review).

dpc00 avatar Sep 25 '26 09:09 dpc00

Claude reports: closing this after 30 days with no response. Reopen it if it is still relevant.

dpc00 avatar Oct 27 '26 19:10 dpc00