From 3eddd39a5aa52d40fbc2e0a12b463d270ddfeba2 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Thu, 2 Nov 2023 12:44:44 +0100 Subject: adding linting with ruff --- scripts/nb.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'scripts/nb.py') diff --git a/scripts/nb.py b/scripts/nb.py index c3bbe40..2e2a7f9 100644 --- a/scripts/nb.py +++ b/scripts/nb.py @@ -1,16 +1,15 @@ #!/usr/bin/env python3 ''' Get exchange rates from nb ''' +import csv import os import sys -import csv import tempfile -from datetime import datetime -from datetime import timedelta -from tzlocal import get_localzone -import requests +from datetime import datetime, timedelta import common +import requests +from tzlocal import get_localzone # I'm not sure I understand Norges Banks json-model. It seems a lot easier to just get the CSV, and convert it to JSON. apiUrl = "https://data.norges-bank.no/api/data/EXR/B.EUR.NOK.SP?format=csv&locale=en" -- cgit v1.2.3