Skip to content

Commit a1ccabc

Browse files
committed
FIX: Better
1 parent 20255b3 commit a1ccabc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

codespell_lib/_codespell.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,14 @@ def __init__(
223223

224224
def init_chardet(self) -> None:
225225
try:
226-
import chardet
227-
except ImportError as e:
226+
import chardet # noqa: F401
227+
except ImportError:
228228
msg = (
229229
"There's no chardet installed to import from. "
230230
"Please, install it and check your PYTHONPATH "
231231
"environment variable"
232232
)
233-
raise ImportError(msg) from e
233+
raise ImportError(msg)
234234
try:
235235
from chardet import UniversalDetector
236236
except ImportError: # chardet < 7

0 commit comments

Comments
 (0)