Use of _ is cleaner for unreferenced vars
This commit is contained in:
parent
5cf9b676e8
commit
a42246e95b
@ -240,7 +240,7 @@ class CitationBase:
|
||||
if new_handle in self.citation_list:
|
||||
new_ref = new_handle
|
||||
n_replace = refs_list.count(old_handle)
|
||||
for dummy_ix_replace in range(n_replace):
|
||||
for _ in range(n_replace):
|
||||
idx = refs_list.index(old_handle)
|
||||
if new_ref:
|
||||
self.citation_list.pop(idx)
|
||||
|
@ -325,7 +325,7 @@ class Family(
|
||||
if new_handle in refs_list:
|
||||
new_ref = self.event_ref_list[refs_list.index(new_handle)]
|
||||
n_replace = refs_list.count(old_handle)
|
||||
for dummy_ix_replace in range(n_replace):
|
||||
for _ in range(n_replace):
|
||||
idx = refs_list.index(old_handle)
|
||||
self.event_ref_list[idx].ref = new_handle
|
||||
refs_list[idx] = new_handle
|
||||
@ -343,7 +343,7 @@ class Family(
|
||||
if new_handle in refs_list:
|
||||
new_ref = self.child_ref_list[refs_list.index(new_handle)]
|
||||
n_replace = refs_list.count(old_handle)
|
||||
for dummy_ix_replace in range(n_replace):
|
||||
for _ in range(n_replace):
|
||||
idx = refs_list.index(old_handle)
|
||||
self.child_ref_list[idx].ref = new_handle
|
||||
refs_list[idx] = new_handle
|
||||
|
@ -160,7 +160,7 @@ class MediaBase:
|
||||
if new_handle in refs_list:
|
||||
new_ref = self.media_list[refs_list.index(new_handle)]
|
||||
n_replace = refs_list.count(old_handle)
|
||||
for dummy_ix_replace in range(n_replace):
|
||||
for _ in range(n_replace):
|
||||
idx = refs_list.index(old_handle)
|
||||
self.media_list[idx].ref = new_handle
|
||||
refs_list[idx] = new_handle
|
||||
|
@ -215,7 +215,7 @@ class NoteBase:
|
||||
if new_handle in self.note_list:
|
||||
new_ref = new_handle
|
||||
n_replace = refs_list.count(old_handle)
|
||||
for dummy_ix_replace in range(n_replace):
|
||||
for _ in range(n_replace):
|
||||
idx = refs_list.index(old_handle)
|
||||
if new_ref:
|
||||
self.note_list.pop(idx)
|
||||
|
@ -424,7 +424,7 @@ class Person(
|
||||
if new_handle in refs_list:
|
||||
new_ref = self.event_ref_list[refs_list.index(new_handle)]
|
||||
n_replace = refs_list.count(old_handle)
|
||||
for dummy_ix_replace in range(n_replace):
|
||||
for _ in range(n_replace):
|
||||
idx = refs_list.index(old_handle)
|
||||
self.event_ref_list[idx].ref = new_handle
|
||||
refs_list[idx] = new_handle
|
||||
@ -454,7 +454,7 @@ class Person(
|
||||
if new_handle in refs_list:
|
||||
new_ref = self.person_ref_list[refs_list.index(new_handle)]
|
||||
n_replace = refs_list.count(old_handle)
|
||||
for dummy_ix_replace in range(n_replace):
|
||||
for _ in range(n_replace):
|
||||
idx = refs_list.index(old_handle)
|
||||
self.person_ref_list[idx].ref = new_handle
|
||||
refs_list[idx] = new_handle
|
||||
|
@ -442,7 +442,7 @@ class Source(
|
||||
if new_handle in refs_list:
|
||||
new_ref = self.reporef_list[refs_list.index(new_handle)]
|
||||
n_replace = refs_list.count(old_handle)
|
||||
for dummy_ix_replace in range(n_replace):
|
||||
for _ in range(n_replace):
|
||||
idx = refs_list.index(old_handle)
|
||||
self.reporef_list[idx].ref = new_handle
|
||||
refs_list[idx] = new_handle
|
||||
|
@ -144,7 +144,7 @@ class TagBase:
|
||||
if new_handle in self.tag_list:
|
||||
new_ref = new_handle
|
||||
n_replace = refs_list.count(old_handle)
|
||||
for dummy_ix_replace in range(n_replace):
|
||||
for _ in range(n_replace):
|
||||
idx = refs_list.index(old_handle)
|
||||
if new_ref:
|
||||
self.tag_list.pop(idx)
|
||||
|
Loading…
Reference in New Issue
Block a user