Open
Description
System:
- Windows 11
- Python 3.12
$ uv run pre-commit --version
pre-commit 4.2.0 (pre-commit-uv=4.1.4, uv=0.7.9)
Issue
I tried adding this pre-commit hook to my .pre-commit-config.yml, but when I attempt to run it, it errors on what I assume is one of the emoji characters used in the name option of other hooks defined in the config file.
I suspect this is related to the python open()
function defaulting to a cp1252 encoding for Windows OS if the encoding is not specified in the function call (line 50 of sync-pre-commit-deps/sync_pre_commit_deps.py):
with open(filename) as f:
loaded = yaml.load(f)
Could the encoding on read default to utf-8? For example:
with open(filename, encoding="utf-8") as f:
loaded = yaml.load(f)
Metadata
Metadata
Assignees
Labels
No labels