Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions codespell_lib/_codespell.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import re
import sys
import textwrap
from ctypes import wintypes
from typing import (
Any,
Dict,
Expand All @@ -40,6 +39,12 @@
Tuple,
)

if sys.platform == "win32":
from ctypes import wintypes

ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004
STD_OUTPUT_HANDLE = wintypes.HANDLE(-11)

from ._spellchecker import Misspelling, build_dict
from ._text_util import fix_case

Expand Down Expand Up @@ -138,10 +143,6 @@
EX_DATAERR = 65
EX_CONFIG = 78

# Windows specific constants
ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004
STD_OUTPUT_HANDLE = wintypes.HANDLE(-11)

# OPTIONS:
#
# ARGUMENTS:
Expand Down