Skip to content

Commit

Permalink
Add more messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
mxr authored Apr 4, 2024
1 parent c5b624e commit 3285353
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ The following arguments are available:
removes UTF-8 byte order marker

#### `fix-encoding-pragma`

_Deprecated since py2 is EOL - use [pyupgrade](https://github.com/asottile/pyupgrade) instead._

Add `# -*- coding: utf-8 -*-` to the top of python files.
- To remove the coding pragma pass `--remove` (useful in a python3-only codebase)

Expand Down
3 changes: 2 additions & 1 deletion pre_commit_hooks/fix_encoding_pragma.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def _normalize_pragma(pragma: str) -> bytes:
def main(argv: Sequence[str] | None = None) -> int:
print(
'warning: this hook is deprecated and will be removed in a future '
'release because py2 is EOL',
'release because py2 is EOL. instead, use '
'https://github.com/asottile/pyupgrade',
file=sys.stderr,
)

Expand Down

0 comments on commit 3285353

Please sign in to comment.