mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-07 20:00:20 +00:00
Try to get Mypy to recognize it this way?
This commit is contained in:
parent
27fcfe94dd
commit
b26652cad1
@ -6,9 +6,12 @@ from __future__ import print_function
|
|||||||
# explains to it that this module is Windows-only. This prevents errors about
|
# explains to it that this module is Windows-only. This prevents errors about
|
||||||
# ctypes.windll and such which only exist when running on Windows.
|
# ctypes.windll and such which only exist when running on Windows.
|
||||||
#
|
#
|
||||||
|
# Beware of the limitations of the Mypy AST analyzer. The check needs to take
|
||||||
|
# exactly this form or it may not be recognized.
|
||||||
|
#
|
||||||
# https://mypy.readthedocs.io/en/stable/common_issues.html?highlight=platform#python-version-and-system-platform-checks
|
# https://mypy.readthedocs.io/en/stable/common_issues.html?highlight=platform#python-version-and-system-platform-checks
|
||||||
from sys import platform
|
import sys
|
||||||
assert platform == "win32"
|
assert sys.platform == "win32"
|
||||||
|
|
||||||
import codecs, re
|
import codecs, re
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
Loading…
x
Reference in New Issue
Block a user