Преглед изворни кода

Fix unnecessary extra work.

master
Ben Kurtovic пре 7 година
родитељ
комит
21aad51375
1 измењених фајлова са 2 додато и 2 уклоњено
  1. +2
    -2
      copyvios/attribution.py

+ 2
- 2
copyvios/attribution.py Прегледај датотеку

@@ -24,9 +24,9 @@ def get_attribution_info(site, page):
if site.name not in ATTRIB_TEMPLATES: if site.name not in ATTRIB_TEMPLATES:
return None return None


templates = ATTRIB_TEMPLATES[site.name]
base = ATTRIB_TEMPLATES[site.name]
prefix = site.namespace_id_to_name(NS_TEMPLATE) prefix = site.namespace_id_to_name(NS_TEMPLATE)
templates |= {prefix + ":" + tmpl for tmpl in templates if ":" not in tmpl}
templates = base | {prefix + ":" + tpl for tpl in base if ":" not in tpl}


for template in page.parse().ifilter_templates(): for template in page.parse().ifilter_templates():
if template.name.matches(templates): if template.name.matches(templates):


Loading…
Откажи
Сачувај