mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
Code review fixes
This commit is contained in:
@@ -24,7 +24,7 @@ def get_sig_ref_info(sig_name, ref_id):
|
||||
|
||||
# Sometimes we allow spaces instead of dashes in references due to common usage that way, but official reference
|
||||
# lists never do, so convert them here.
|
||||
ref_id.replace(" ", "-")
|
||||
ref_id = ref_id.replace(" ", "-")
|
||||
|
||||
# Prepare the object to be returned
|
||||
sig_ref = SIGRef(sig=sig_name, id=ref_id)
|
||||
@@ -117,9 +117,9 @@ def get_sig_ref_info(sig_name, ref_id):
|
||||
try:
|
||||
lookup_data = DATA_STORE.sigrefs.get(key) if key in DATA_STORE.sigrefs else None
|
||||
if lookup_data:
|
||||
for key, value in lookup_data.__dict__.items():
|
||||
if value is not None and sig_ref.__dict__.get(key) is None:
|
||||
sig_ref.__dict__[key] = value
|
||||
for attr, value in lookup_data.__dict__.items():
|
||||
if value is not None and sig_ref.__dict__.get(attr) is None:
|
||||
sig_ref.__dict__[attr] = value
|
||||
|
||||
else:
|
||||
# Maybe a super new reference we don't know about yet, but more likely a typo or a test reference,
|
||||
|
||||
Reference in New Issue
Block a user