瀏覽代碼

Fix unnecessary extra work.

copyvios-ng
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:
return None

templates = ATTRIB_TEMPLATES[site.name]
base = ATTRIB_TEMPLATES[site.name]
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():
if template.name.matches(templates):


Loading…
取消
儲存