Skip to content

Commit c15a4d5

Browse files
MichaelCurrinamaank404github-actionscclauss
authored
Refactor currency_converter.py (TheAlgorithms#5917)
* Update currency_converter.py * refactor: add types and remove reserved keyword "from" usage * feat: update text * Update web_programming/currency_converter.py Co-authored-by: xcodz-dot <[email protected]> * Update web_programming/currency_converter.py Co-authored-by: xcodz-dot <[email protected]> * fix: update currency_converter.py * updating DIRECTORY.md * Update currency_converter.py Co-authored-by: xcodz-dot <[email protected]> Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Co-authored-by: Christian Clauss <[email protected]>
1 parent 7423875 commit c15a4d5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: web_programming/currency_converter.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
URL_BASE = "https://www.amdoren.com/api/currency.php"
1111
TESTING = os.getenv("CI", False)
1212
API_KEY = os.getenv("AMDOREN_API_KEY", "")
13-
if not API_KEY and not TESTING:
14-
raise KeyError("Please put your API key in an environment variable.")
1513

14+
if not API_KEY and not TESTING:
15+
raise KeyError(
16+
"API key must be provided in the 'AMDOREN_API_KEY' environment variable."
17+
)
1618

1719
# Currency and their description
1820
list_of_currencies = """

0 commit comments

Comments
 (0)