Fix platform specific type checking.

This commit is contained in:
Dain Nilsson 2022-04-15 13:46:14 +02:00
parent 0436ab9026
commit c77d30d456
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8
2 changed files with 11 additions and 3 deletions

View File

@ -24,6 +24,10 @@ from array import array
from typing import Set
import logging
import sys
# Don't typecheck this file on Windows
assert sys.platform != "win32" # nosec
logger = logging.getLogger(__name__)

View File

@ -17,13 +17,17 @@
from .base import HidDescriptor, CtapHidConnection, FIDO_USAGE_PAGE, FIDO_USAGE
import ctypes
import platform
from ctypes import WinDLL, WinError # type: ignore
from ctypes import wintypes, LibraryLoader
from typing import Dict, cast
import ctypes
import platform
import logging
import sys
# Only typecheck this file on Windows
assert sys.platform == "win32" # nosec
from ctypes import WinDLL, WinError # noqa: E402
logger = logging.getLogger(__name__)