From 23ffb23fb7369ee95735bd4d4f0310d82518e286 Mon Sep 17 00:00:00 2001 From: YustinaKvr Date: Thu, 6 Jun 2024 12:16:40 +0200 Subject: [PATCH] lint fixes --- ecosystem_issues.py | 4 ++-- failed_zuul.py | 9 +++++---- gitea_info.py | 10 +++++----- github_info.py | 4 ++-- last_commit_info.py | 2 +- open_issues.py | 6 +++--- otc_services_dict.py | 7 ++++--- scheduler.py | 6 +++--- 8 files changed, 25 insertions(+), 23 deletions(-) diff --git a/ecosystem_issues.py b/ecosystem_issues.py index 674c242..c731d68 100644 --- a/ecosystem_issues.py +++ b/ecosystem_issues.py @@ -2,10 +2,10 @@ This script gathers info about github issues in infra repos, for ecosystem squad """ -import time import logging -from datetime import datetime, timedelta +import time import os +from datetime import datetime, timedelta import psycopg2 from github import Github diff --git a/failed_zuul.py b/failed_zuul.py index ca857e3..bc41292 100644 --- a/failed_zuul.py +++ b/failed_zuul.py @@ -2,14 +2,15 @@ This script gathers info regarding PRs, which check jobs in zuul has been failed """ -from datetime import datetime -import time +import json import logging import os -import requests -import json import re +import time +from datetime import datetime import psycopg2 +import requests + logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') diff --git a/gitea_info.py b/gitea_info.py index 5d24c1e..8f23406 100644 --- a/gitea_info.py +++ b/gitea_info.py @@ -2,16 +2,16 @@ This script gather and process info about dependent PRs, its parents and store it in postgres table """ -import time +import csv +import json import logging import os -import json -import csv -import re import pathlib +import re +import time import psycopg2 -from github import Github import requests +from github import Github logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') diff --git a/github_info.py b/github_info.py index d049412..2994d1b 100644 --- a/github_info.py +++ b/github_info.py @@ -2,12 +2,12 @@ This script retrieves info about parent PRs on Github """ -import time import logging import os -import requests import re +import time import psycopg2 +import requests from github import Github logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') diff --git a/last_commit_info.py b/last_commit_info.py index 3901486..73d410a 100644 --- a/last_commit_info.py +++ b/last_commit_info.py @@ -3,11 +3,11 @@ """ from datetime import datetime -import time import logging import os import shutil import tempfile +import time import psycopg2 from github import Github diff --git a/open_issues.py b/open_issues.py index a586ca8..6b153c5 100644 --- a/open_issues.py +++ b/open_issues.py @@ -3,14 +3,14 @@ """ import time -import logging import json -import re +import logging import os +import re from datetime import datetime -from github import Github import requests import psycopg2 +from github import Github logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') diff --git a/otc_services_dict.py b/otc_services_dict.py index 97c8eeb..bdcfc34 100644 --- a/otc_services_dict.py +++ b/otc_services_dict.py @@ -3,13 +3,14 @@ service postgres tables, to match repo names, service full names and its squads """ -import time +import base64 import logging import os +import time +import psycopg2 import requests import yaml -import base64 -import psycopg2 + logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') diff --git a/scheduler.py b/scheduler.py index e288349..fcbecb0 100644 --- a/scheduler.py +++ b/scheduler.py @@ -2,14 +2,14 @@ This script sends Zulip messages to a corresponding squads via Zulip bot, based on info taken from postgres tables """ -import time import logging +import os +import time from datetime import datetime from urllib.parse import quote -import os import psycopg2 -from psycopg2.extras import DictCursor import zulip +from psycopg2.extras import DictCursor logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')