Closed pogzyb closed 1 year ago
Attention: 38 lines
in your changes are missing coverage. Please review.
Comparison is base (
9dc7ad0
) 88.62% compared to head (7b3260d
) 85.84%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This actually broke the functionality, advertised in the main README: both rdap
methods now return None
for bitcoin.org
registrar.
Reason:
def convert_whodap_keys(parser_output: dict) -> dict:
conversions = [ # snip
(TLDBaseKeys.REGISTRAR, "registrar_name", False), # 'registrar'
]
for asyncwhois_key, whodap_key, keep in conversions:
if keep:
parser_output[asyncwhois_key] = parser_output.get(whodap_key)
else:
parser_output[asyncwhois_key] = parser_output.pop(whodap_key)
# at this point, parser_output['registrar'] is the registrar name
non_whodap_keys = [
TLDBaseKeys.REGISTRAR, # also 'registrar'
]
for key in non_whodap_keys:
parser_output[key] = None # overwrites any value present in parser_output
# at this point, parser_output['registrar'] is None
The easiest fix would probably be to remove this key, present in conversions
, from non_whodap_keys
.
This actually broke the functionality, advertised in the main README: both
rdap
methods now returnNone
forbitcoin.org
registrar. Reason:def convert_whodap_keys(parser_output: dict) -> dict: conversions = [ # snip (TLDBaseKeys.REGISTRAR, "registrar_name", False), # 'registrar' ] for asyncwhois_key, whodap_key, keep in conversions: if keep: parser_output[asyncwhois_key] = parser_output.get(whodap_key) else: parser_output[asyncwhois_key] = parser_output.pop(whodap_key) # at this point, parser_output['registrar'] is the registrar name non_whodap_keys = [ TLDBaseKeys.REGISTRAR, # also 'registrar' ] for key in non_whodap_keys: parser_output[key] = None # overwrites any value present in parser_output # at this point, parser_output['registrar'] is None
The easiest fix would probably be to remove this key, present in
conversions
, fromnon_whodap_keys
.
Thanks for pointing this out! I added your suggestion and rolled it into v1.1.4.
Fixes:
64