mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 22:14:55 -04:00
Do for loop once at start
This commit is contained in:
parent
d1f56f732e
commit
866fe27e78
1 changed files with 17 additions and 8 deletions
|
@ -62,10 +62,6 @@ def make_base_append_rules(kind):
|
||||||
elif kind == 'content':
|
elif kind == 'content':
|
||||||
rules = BASE_APPEND_CONTENT_RULES
|
rules = BASE_APPEND_CONTENT_RULES
|
||||||
|
|
||||||
for r in rules:
|
|
||||||
r['priority_class'] = PRIORITY_CLASS_MAP[kind]
|
|
||||||
r['default'] = True # Deprecated, left for backwards compat
|
|
||||||
|
|
||||||
return rules
|
return rules
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,10 +71,6 @@ def make_base_prepend_rules(kind):
|
||||||
if kind == 'override':
|
if kind == 'override':
|
||||||
rules = BASE_PREPEND_OVERRIDE_RULES
|
rules = BASE_PREPEND_OVERRIDE_RULES
|
||||||
|
|
||||||
for r in rules:
|
|
||||||
r['priority_class'] = PRIORITY_CLASS_MAP[kind]
|
|
||||||
r['default'] = True # Deprecated, left for backwards compat
|
|
||||||
|
|
||||||
return rules
|
return rules
|
||||||
|
|
||||||
|
|
||||||
|
@ -261,3 +253,20 @@ BASE_APPEND_UNDERRIDE_RULES = [
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
for r in BASE_APPEND_CONTENT_RULES:
|
||||||
|
r['priority_class'] = PRIORITY_CLASS_MAP['content']
|
||||||
|
r['default'] = True
|
||||||
|
|
||||||
|
for r in BASE_PREPEND_OVERRIDE_RULES:
|
||||||
|
r['priority_class'] = PRIORITY_CLASS_MAP['override']
|
||||||
|
r['default'] = True
|
||||||
|
|
||||||
|
for r in BASE_APPEND_OVRRIDE_RULES:
|
||||||
|
r['priority_class'] = PRIORITY_CLASS_MAP['override']
|
||||||
|
r['default'] = True
|
||||||
|
|
||||||
|
for r in BASE_APPEND_UNDERRIDE_RULES:
|
||||||
|
r['priority_class'] = PRIORITY_CLASS_MAP['underride']
|
||||||
|
r['default'] = True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue