Enable flake8-commas linting rules (#267)

See https://docs.astral.sh/ruff/rules/#flake8-commas-com.
This commit is contained in:
Marc Wrobel
2023-12-30 10:53:51 +01:00
parent 6e49297e18
commit 1bb97fe2b4
3 changed files with 3 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ select = [
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C90", # mccabe
"COM", # flake8-commas
"E", # pycodestyle errors
"F", # pyflakes errors
"I", # isort

View File

@@ -16,7 +16,7 @@ URLS = [
"https://helpx.adobe.com/coldfusion/kb/coldfusion-2016-updates.html",
"https://helpx.adobe.com/coldfusion/kb/coldfusion-2018-updates.html",
"https://helpx.adobe.com/coldfusion/kb/coldfusion-2021-updates.html",
"https://helpx.adobe.com/coldfusion/kb/coldfusion-2023-updates.html"
"https://helpx.adobe.com/coldfusion/kb/coldfusion-2023-updates.html",
]
VERSION_AND_DATE_PATTERN = re.compile(r"Release Date[,|:]? (.*?)\).*?Build Number: (.*?)$",

View File

@@ -130,7 +130,7 @@ class Product:
with open(self.versions_path, "w") as f:
f.write(json.dumps(dict(
# sort by date then version (desc)
sorted(versions.items(), key=lambda x: (x[1], x[0]), reverse=True)
sorted(versions.items(), key=lambda x: (x[1], x[0]), reverse=True),
), indent=2))
def __repr__(self) -> str: