Closed
Description
I ran Ruff on medium sized project and then pyupgrade. Ruff missed one UP031
autofix that pyupgrade fixed. Both Ruff and pyupgrade missed 96 UP031
(a known problem) and 23 UP032
(a few of these may be caused by #8106).
Ruff command:
ruff --target-version py310 --select UP --line-length 320 --unsafe-fixes --fix .
pyupgrade command:
pyupgrade --py310-plus **/*.py
Diff:
- path = "%s-%s-%s.pem" % (
+ path = "{}-{}-{}.pem".format(
safe_domain_name(cn), # common name, which should be filename safe because it is IDNA-encoded, but in case of a malformed cert make sure it's ok to use as a filename
cert.not_valid_after.date().isoformat().replace("-", ""), # expiration date
hexlify(cert.fingerprint(hashes.SHA256())).decode("ascii")[0:8], # fingerprint prefix
)
(There were some additional differences due to Ruff not supporting the newer pyupgrade rules.)
Ruff version:
ruff 0.1.1