Add CI workflow to test code with older versions of python #6

Merged
nathanwoodburn merged 9 commits from feat/ci-testing into main 2025-09-02 16:08:37 +10:00
4 changed files with 8 additions and 8 deletions
Showing only changes of commit 86e174c337 - Show all commits

View File

@@ -126,7 +126,7 @@ def automations_background(authentication):
account_name = account.check_account(authentication)
password = ":".join(authentication.split(":")[1:])
if account_name == False:
if not account_name:
return {
"error": {
"message": "Invalid account"

View File

@@ -382,7 +382,7 @@ def bid(params, authentication):
bid = float(params["bid"])
blind = float(params["blind"])
blind+=bid
except:
except ValueError:
return {
"status":"Invalid bid amount",
"transaction":None

View File

@@ -88,7 +88,7 @@ def main(params, authentication):
return {"status": f"Failed: {batch['error']['message']}", "transaction": "None"}
if 'result' in batch:
if batch['result'] != None:
if batch['result'] is not None:
tx = batch['result']['hash']
return {"status": "Success", "transaction": tx}
# Note only one batch can be sent at a time

View File

@@ -93,7 +93,7 @@ def status(params, authentication):
response = requests.post(f"https://{instance}/api", json=data, headers=headers)
if response.status_code != 200:
return {"status": "Error connecting to Varo"}
if response.json()["success"] != True:
if not response.json()["success"]:
return {"status": "Error connecting to Varo"}
return {"status": f"Connected to {instance}"}
@@ -110,7 +110,7 @@ def login(params, authentication):
if response.status_code != 200:
return {"status": "Error connecting to Varo"}
if response.json()["success"] != True:
if not response.json()["success"]:
return {"status": "Error connecting to Varo"}
auth = {
@@ -146,7 +146,7 @@ def addDomain(params, authentication):
zones = requests.post(f"https://{instance}/api", json=data, headers=headers)
if zones.status_code != 200:
return {"status": "Error connecting to Varo"}
if zones.json()["success"] != True:
if not zones.json()["success"]:
return {"status": "Error connecting to Varo"}
zones = zones.json()["data"]
@@ -169,7 +169,7 @@ def addDomain(params, authentication):
response = requests.post(f"https://{instance}/api", json=data, headers=headers)
if response.status_code != 200:
return {"status": "Error connecting to Varo"}
if response.json()["success"] != True:
if not response.json()["success"]:
return {"status": "Error connecting to Varo"}
zoneID = response.json()["data"]["zone"]
data = {
@@ -179,7 +179,7 @@ def addDomain(params, authentication):
response = requests.post(f"https://{instance}/api", json=data, headers=headers)
if response.status_code != 200:
return {"status": "Error connecting to Varo"}
if response.json()["success"] != True:
if not response.json()["success"]:
return {"status": "Error connecting to Varo"}
zone = response.json()["data"]