Reformat imports with isort (#3123)

Besides that:
1. Introduce `setup.py isort` for quick check
2. Introduce GH actions to check imports
This commit is contained in:
Alexander Kukushkin
2024-08-13 17:53:59 +02:00
committed by GitHub
parent c931da1eb3
commit 93eb4edbe6
88 changed files with 447 additions and 287 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env python
import os
import argparse
import os
import shutil
if __name__ == "__main__":
+1
View File
@@ -1,5 +1,6 @@
#!/usr/bin/env python
import sys
with open("data/{0}/{0}_cb.log".format(sys.argv[1]), "a+") as log:
log.write(" ".join(sys.argv[-3:]) + "\n")
+6 -3
View File
@@ -1,9 +1,8 @@
import abc
import datetime
import glob
import os
import json
import psutil
import os
import re
import shutil
import signal
@@ -13,11 +12,14 @@ import sys
import tempfile
import threading
import time
from http.server import BaseHTTPRequestHandler, HTTPServer
import psutil
import yaml
import patroni.psycopg as psycopg
from http.server import BaseHTTPRequestHandler, HTTPServer
from patroni.request import PatroniRequest
@@ -498,6 +500,7 @@ class AbstractEtcdController(AbstractDcsController):
def _is_running(self):
from patroni.dcs.etcd import DnsCachingResolver
# if etcd is running, but we didn't start it
try:
self._client = self._client_cls({'host': 'localhost', 'port': 2379, 'retry_timeout': 30,
+4 -2
View File
@@ -1,8 +1,10 @@
import json
import patroni.psycopg as pg
from time import sleep, time
from behave import step, then
from time import sleep, time
import patroni.psycopg as pg
@step('I start {name:w}')
+4 -3
View File
@@ -1,11 +1,12 @@
import json
import time
from behave import step, then
from dateutil import tz
from datetime import datetime
from functools import partial
from threading import Thread, Event
from threading import Event, Thread
from behave import step, then
from dateutil import tz
tzutc = tz.tzutc()
+4 -2
View File
@@ -1,14 +1,16 @@
import json
import parse
import shlex
import subprocess
import sys
import time
from datetime import datetime, timedelta
import parse
import yaml
from behave import register_type, step, then
from dateutil import tz
from datetime import datetime, timedelta
tzutc = tz.tzutc()
+1
View File
@@ -2,6 +2,7 @@ import json
import time
from behave import step, then
import patroni.psycopg as pg
+2 -1
View File
@@ -1,6 +1,7 @@
from behave import step, then
import time
from behave import step, then
def polling_loop(timeout, interval=1):
"""Returns an iterator that returns values until timeout has passed. Timeout is measured from start of iteration."""