Fiat_converter: fstrings into use

This commit is contained in:
Samuel Husso 2018-06-05 08:33:08 +03:00
parent 18e3090379
commit b5c200f6c4

View File

@ -119,7 +119,7 @@ class CryptoToFiatConverter(object):
# Check if the fiat convertion you want is supported # Check if the fiat convertion you want is supported
if not self._is_supported_fiat(fiat=fiat_symbol): if not self._is_supported_fiat(fiat=fiat_symbol):
raise ValueError('The fiat {} is not supported.'.format(fiat_symbol)) raise ValueError(f'The fiat {fiat_symbol} is not supported.')
# Get the pair that interest us and return the price in fiat # Get the pair that interest us and return the price in fiat
for pair in self._pairs: for pair in self._pairs:
@ -182,7 +182,7 @@ class CryptoToFiatConverter(object):
""" """
# Check if the fiat convertion you want is supported # Check if the fiat convertion you want is supported
if not self._is_supported_fiat(fiat=fiat_symbol): if not self._is_supported_fiat(fiat=fiat_symbol):
raise ValueError('The fiat {} is not supported.'.format(fiat_symbol)) raise ValueError(f'The fiat {fiat_symbol} is not supported.')
# No need to convert if both crypto and fiat are the same # No need to convert if both crypto and fiat are the same
if crypto_symbol == fiat_symbol: if crypto_symbol == fiat_symbol: