-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
Problem
The CI tests were failing for Python 3.14 lint environments with the following error:
TypeError: cannot use a bytes pattern on a string-like object
This occurred in pyupgrade when processing files with Python 3.14, specifically in the tokenize.cookie_re.match(token.src) call.
Root Cause
pyupgrade v3.15.0 (the version in use) is incompatible with Python 3.14 due to changes in Python 3.14's tokenize module. The tool hasn't been updated to handle Python 3.14's tokenization API changes.
Solution
Update pyupgrade from v3.15.0 to v3.21.2 (latest version, released November 19, 2025) which includes Python 3.14 support.
Changes
- Updated
.pre-commit-config.yamlto usepyupgrade v3.21.2
Testing
- ✅ All pre-commit hooks pass locally
- ✅ Python 3.14 lint tests now pass
- ✅ All other Python versions (3.10-3.13) continue to work
Related
This fixes the CI failures seen in PR #23 (though the failures were unrelated to that PR's changes).
Metadata
Metadata
Assignees
Labels
No labels