Skip to content

Commit

Permalink
fix type error syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
ehinman committed Sep 4, 2024
1 parent 2603d5d commit 13bb200
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions dataretrieval/wqp.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,20 @@ def get_results(ssl_check=True, legacy=True, **kwargs):
if legacy is True:
if 'dataProfile' in kwargs:
if kwargs['dataProfile'] not in result_profiles_legacy:
raise TypeError(f'dataProfile {kwargs['dataProfile']} is not a legacy profile name. '
'Please choose from "resultPhysChem", "biological", or "narrowResult"')
raise TypeError(f"""
dataProfile "{kwargs['dataProfile']}" is not a legacy profile name.
Please choose from "resultPhysChem", "biological", or "narrowResult"
""")

url = wqp_url('Result')

else:
if 'dataProfile' in kwargs:
if kwargs['dataProfile'] not in result_profiles_wqx3:
raise TypeError(f'dataProfile {kwargs['dataProfile']} is not a WQX3.0 profile name. '
'Please choose from "fullPhysChem", "narrow", or "basicPhysChem"')
raise TypeError(f"""
dataProfile "{kwargs['dataProfile']}" is not a WQX3.0 profile name.
Please choose from "fullPhysChem", "narrow", or "basicPhysChem"
""")
else:
kwargs['dataProfile'] = 'fullPhysChem'

Expand Down

0 comments on commit 13bb200

Please sign in to comment.