We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35f3b60 commit 04e9681Copy full SHA for 04e9681
codespell_lib/_codespell.py
@@ -25,7 +25,6 @@
25
import re
26
import sys
27
import textwrap
28
-from ctypes import wintypes
29
from typing import (
30
Any,
31
Dict,
@@ -40,6 +39,12 @@
40
39
Tuple,
41
)
42
+if sys.platform == "win32":
43
+ from ctypes import wintypes
44
+
45
+ ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004
46
+ STD_OUTPUT_HANDLE = wintypes.HANDLE(-11)
47
48
from ._spellchecker import Misspelling, build_dict
49
from ._text_util import fix_case
50
@@ -138,10 +143,6 @@
138
143
EX_DATAERR = 65
139
144
EX_CONFIG = 78
140
145
141
-# Windows specific constants
142
-ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004
-STD_OUTPUT_HANDLE = wintypes.HANDLE(-11)
-
146
# OPTIONS:
147
#
148
# ARGUMENTS:
0 commit comments