Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

characters_groups_to_remove deleted and chracters_to_remove changed to set

Bonicki Wojciechbca2332d7b0d
diff --git a/wger/utils/constants.py b/wger/utils/constants.py
index a88428b02..53839696a 100644
--- a/wger/utils/constants.py
+++ b/wger/utils/constants.py
@@ -78,39 +78,29 @@ UUID_FRENCH_PRESS = '95a7e546-e8f8-4521-a76b-983d94161b25'
UUID_CRUNCHES = 'b186f1f8-4957-44dc-bf30-d0b00064ce6f'
UUID_LEG_RAISES = 'c2078aac-e4e2-4103-a845-6252a3eb795e'
-CHARACTERS_GROUPS_TO_REMOVE: dict = {
- 'control_characters': [
- '\x8a',
- '\x83',
- '\x8f',
- '\x8d',
- '\x82',
- '\x9a',
- '\x89',
- '\x99',
- '\x87',
- '\x9c',
- '\x80',
- '\x96',
- '\t',
- '\x92',
- '\x8c',
- '\x90',
- '\x9f',
- '\x84',
- '\x97',
- '\x93',
- '\x98',
- '\x85',
- ],
- 'format_characters': [],
- 'space_separators': [],
- 'quotation_or_parenthesis': [],
- 'symbols_and_emoji': [],
-}
-
CHARACTERS_TO_REMOVE_FROM_INGREDIENT_NAME: set[str] = {
- char for group in CHARACTERS_GROUPS_TO_REMOVE.values() for char in group
+ '\x8a',
+ '\x83',
+ '\x8f',
+ '\x8d',
+ '\x82',
+ '\x9a',
+ '\x89',
+ '\x99',
+ '\x87',
+ '\x9c',
+ '\x80',
+ '\x96',
+ '\t',
+ '\x92',
+ '\x8c',
+ '\x90',
+ '\x9f',
+ '\x84',
+ '\x97',
+ '\x93',
+ '\x98',
+ '\x85',
}
HTML_ENTITY_TO_HUMAN_READABLE_MAP = {