Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d258650

Browse files
committed
use comparison with sys.platform so mypy understands it
1 parent 74183d9 commit d258650

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pre_commit/file_lock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import contextlib
22
import errno
3-
import os
3+
import sys
44
from typing import Callable
55
from typing import Generator
66

77

8-
if os.name == 'nt': # pragma: no cover (windows)
8+
if sys.platform == 'win32': # pragma: no cover (windows)
99
import msvcrt
1010

1111
# https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/locking

0 commit comments

Comments
 (0)