Improve adherence to python coding standards and clear up IDE static analysis warnings

This commit is contained in:
Ian Renton
2026-02-27 19:17:04 +00:00
parent 6b18ec6f88
commit 6982354364
53 changed files with 633 additions and 626 deletions

View File

@@ -13,13 +13,13 @@ cache = CachedSession("/tmp/cache", expire_after=timedelta(days=30))
data = cache.get("https://raw.githubusercontent.com/k0swe/dxcc-json/refs/heads/main/dxcc.json").json()
for dxcc in data["dxcc"]:
id = dxcc["entityCode"]
dxcc_id = dxcc["entityCode"]
flag = dxcc["flag"]
image = Image.new("RGBA", (140, 110), (255, 0, 0, 0))
draw = ImageDraw.Draw(image)
draw.text((0, -10), flag, font=ImageFont.truetype("/usr/share/fonts/truetype/noto/NotoColorEmoji.ttf", 109),
embedded_color=True)
outfile = str(id) + ".png"
outfile = str(dxcc_id) + ".png"
image.save(outfile, "PNG")
image = Image.new("RGBA", (140, 110), (255, 0, 0, 0))