summaryrefslogtreecommitdiffstats
path: root/pre_commit_hooks/fix_encoding_pragma.py
diff options
context:
space:
mode:
Diffstat (limited to 'pre_commit_hooks/fix_encoding_pragma.py')
-rw-r--r--pre_commit_hooks/fix_encoding_pragma.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pre_commit_hooks/fix_encoding_pragma.py b/pre_commit_hooks/fix_encoding_pragma.py
index 60c71ee..eee6705 100644
--- a/pre_commit_hooks/fix_encoding_pragma.py
+++ b/pre_commit_hooks/fix_encoding_pragma.py
@@ -1,6 +1,7 @@
from __future__ import annotations
import argparse
+import sys
from typing import IO
from typing import NamedTuple
from typing import Sequence
@@ -107,6 +108,13 @@ 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. instead, use '
+ 'https://github.com/asottile/pyupgrade',
+ file=sys.stderr,
+ )
+
parser = argparse.ArgumentParser(
'Fixes the encoding pragma of python files',
)