From 7d3af39eb12ffa0f12a55435bde10652c2e3ac56 Mon Sep 17 00:00:00 2001 From: clampr Date: Fri, 23 Feb 2024 08:24:17 +0100 Subject: [PATCH] Fix more lint errors --- database.py | 3 +++ scripts/active.py | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/database.py b/database.py index e05ae6915..bc7edba52 100644 --- a/database.py +++ b/database.py @@ -1,3 +1,6 @@ +""" +Convert JSON files to SQLite +""" import os import json import sqlite3 diff --git a/scripts/active.py b/scripts/active.py index 0aa69e631..c4ca3f7a8 100644 --- a/scripts/active.py +++ b/scripts/active.py @@ -7,6 +7,9 @@ def check_status(url): + """ + Check if HTTP status code equals 404 + """ try: response = requests.head(url) return response.status_code == 404 @@ -16,9 +19,8 @@ def check_status(url): def set_active(data: dict, _) -> dict: """ - Find time zone for weather station + Update active flag """ - if data: urls = [