Skip to content

Commit

Permalink
Workaround for Python issue (codespell-project#3546)
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos authored Sep 19, 2024
1 parent 35f3b60 commit 04e9681
Showing 1 changed file with 6 additions and 5 deletions.
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

0 comments on commit 04e9681

Please sign in to comment.