many changes

This commit is contained in:
Pablo Martin 2024-06-11 21:10:07 +02:00
parent 126ede37a4
commit 661941a65c
7 changed files with 102 additions and 21 deletions

View file

@ -18,8 +18,8 @@ class CSVRateWriter(RateWriter):
self.output_file_path = output_file_path
def write_rates(self, rates: ExchangeRates) -> None:
with open(self.output_file_path, mode="w", newline="") as csvfile:
csv_writer = csv.writer(csvfile)
with open(self.output_file_path, mode="w") as csv_file:
csv_writer = csv.writer(csv_file)
csv_writer.writerow(["from_currency", "to_currency", "rate", "rate_date"])
# Write the exchange rate data