Skip to content

Commit

Permalink
Fixing linting error. Specifying encoding for opening file
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonard Eshun authored and Leonard Eshun committed Sep 6, 2024
1 parent 64d55e2 commit b291f34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def add(a, b):
def get_the_capital_of_a_country(country: str) -> str:
capital = ""
# Open and read the JSON file
with open("country_capital.json", "r") as file:
with open(file="country_capital.json", mode="r", encoding="utf-8") as file:
data = json.load(file)
capital = (
data[country.lower()]
Expand Down

0 comments on commit b291f34

Please sign in to comment.