File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 145145 language : python
146146 types : [text]
147147- id : fix-encoding-pragma
148- name : fix python encoding pragma
148+ name : fix python encoding pragma (deprecated)
149149 description : ' adds # -*- coding: utf-8 -*- to the top of python files.'
150150 language : python
151151 entry : fix-encoding-pragma
Original file line number Diff line number Diff line change 11from __future__ import annotations
22
33import argparse
4+ import sys
45from typing import IO
56from typing import NamedTuple
67from typing import Sequence
@@ -107,6 +108,12 @@ def _normalize_pragma(pragma: str) -> bytes:
107108
108109
109110def main (argv : Sequence [str ] | None = None ) -> int :
111+ print (
112+ "warning: this hook is deprecated and will be removed in a future "
113+ "release because py2 is EOL" ,
114+ file = sys .stderr
115+ )
116+
110117 parser = argparse .ArgumentParser (
111118 'Fixes the encoding pragma of python files' ,
112119 )
You can’t perform that action at this time.
0 commit comments