Use of _ is cleaner for unreferenced vars

This commit is contained in:
Christopher Horn 2023-08-05 13:25:58 -04:00
parent 5cf9b676e8
commit a42246e95b
7 changed files with 9 additions and 9 deletions

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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)