Skip to content

Remove check-byte-order-marker and fix-encoding-pragma #1034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2025

Conversation

mxr
Copy link
Member

@mxr mxr commented Apr 2, 2024

Resolves #1032

$  pre-commit try-repo . check-byte-order-marker --files setup.py ; pre-commit try-repo . fix-encoding-pragma --files setup.py
===============================================================================
Using config:
===============================================================================
repos:
-   repo: .
    rev: 5920aee766fa13b4fe8b1727ffa46495c151e24b
    hooks:
    -   id: check-byte-order-marker
===============================================================================
[INFO] Initializing environment for ..
[INFO] Installing environment for ..
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Using pre-commit with uv 0.6.14 via pre-commit-uv 4.1.4
check-byte-order-marker (removed)........................................Failed
- hook id: check-byte-order-marker
- exit code: 1

`check-byte-order-marker` has been removed -- use `fix-byte-order-marker` from https://github.com/pre-commit/pre-commit-hooks

===============================================================================
Using config:
===============================================================================
repos:
-   repo: .
    rev: 5920aee766fa13b4fe8b1727ffa46495c151e24b
    hooks:
    -   id: fix-encoding-pragma
===============================================================================
[INFO] Initializing environment for ..
[INFO] Installing environment for ..
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Using pre-commit with uv 0.6.14 via pre-commit-uv 4.1.4
fix python encoding pragma (removed).....................................Failed
- hook id: fix-encoding-pragma
- exit code: 1

`fix-encoding-pragma` has been removed -- use `pyupgrade` from https://github.com/asottile/pyupgrade

@asottile asottile force-pushed the fix-encoding-pragma branch from 3285353 to cef973f Compare April 6, 2024 18:10
Base automatically changed from fix-encoding-pragma to main April 6, 2024 18:12
@mxr mxr force-pushed the remove-fix-encoding-pragma branch 2 times, most recently from 37ae88d to b2bb193 Compare April 11, 2024 01:52
@mxr mxr requested a review from asottile March 4, 2025 22:31
@asottile
Copy link
Member

a year late to this but -- let's use pre-commit-hooks-removed for at least a version so people are notified instead of autoupdate just stalling

we can also do this for check-byte-order-marker at the same time

@mxr mxr force-pushed the remove-fix-encoding-pragma branch from cfe7323 to a1b31bd Compare May 25, 2025 14:55
@mxr mxr changed the title Delete fix-encoding-pragma hook Mark check-byte-ordering and fix-encoding-pragma as removed May 25, 2025
@mxr mxr force-pushed the remove-fix-encoding-pragma branch 2 times, most recently from 3c87799 to 5eff2a3 Compare May 25, 2025 14:58
@mxr mxr changed the title Mark check-byte-ordering and fix-encoding-pragma as removed Mark check-byte-order-marker and fix-encoding-pragma as removed May 25, 2025
@mxr mxr force-pushed the remove-fix-encoding-pragma branch 2 times, most recently from b318b47 to 0b0e2b9 Compare May 25, 2025 15:01
@mxr mxr changed the title Mark check-byte-order-marker and fix-encoding-pragma as removed Remove check-byte-order-marker and fix-encoding-pragma May 25, 2025
@mxr mxr force-pushed the remove-fix-encoding-pragma branch from 0b0e2b9 to 5920aee Compare May 25, 2025 15:03
@mxr
Copy link
Member Author

mxr commented May 25, 2025

@asottile sure, updated

@mxr
Copy link
Member Author

mxr commented May 25, 2025

And removed the code (let me know if I misunderstood)

@asottile asottile merged commit 2a9bc76 into main May 25, 2025
8 checks passed
@asottile asottile deleted the remove-fix-encoding-pragma branch May 25, 2025 15:10
@mxr
Copy link
Member Author

mxr commented May 25, 2025

no cat gif?

@asottile
Copy link
Member

on my phone, here you go!

@mxr
Copy link
Member Author

mxr commented May 25, 2025

woo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate/remove fix-encoding-pragma hook?
3 participants