Taken from https://github.com/django/django/blob/master/django/utils/text.py Convert to ASCII if 'allow_unicode' is False. Convert spaces or repeated dashes to single dashes. Remove characters that aren't alphanumerics, underscores, or hyphens. Convert to lowercase. Also strip leadi
(value, allow_unicode=False)
| 26 | return False |
| 27 | |
| 28 | def slugify(value, allow_unicode=False): |
| 29 | """ |
| 30 | Taken from https://github.com/django/django/blob/master/django/utils/text.py |
| 31 | Convert to ASCII if 'allow_unicode' is False. Convert spaces or repeated |
| 32 | dashes to single dashes. Remove characters that aren't alphanumerics, |
| 33 | underscores, or hyphens. Convert to lowercase. Also strip leading and |
| 34 | trailing whitespace, dashes, and underscores. |
| 35 | """ |
| 36 | value = str(value) |
| 37 | if allow_unicode: |
| 38 | value = unicodedata.normalize('NFKC', value) |
| 39 | else: |
| 40 | value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii') |
| 41 | value = re.sub(r'[^\w\s-]', '', value.lower()) |
| 42 | return re.sub(r'[-\s]+', '-', value).strip('-_') |
| 43 | |
| 44 | |
| 45 | COMFYUI_REPO_URL = "https://github.com/comfyanonymous/ComfyUI.git" |
no outgoing calls
no test coverage detected