Fixes for mypy 0.600 (#324)
* Remove the mypy version constraint and set strict_optional to False. * Add type annotations for `ISA` variables. mypy 0.600 seems to require explicit annotations here. * Annotate the ISA variables in the defs.py files too.
This commit is contained in:
@@ -16,6 +16,7 @@ This target ISA generates code for x86 CPUs with two separate CPU modes:
|
||||
from __future__ import absolute_import
|
||||
from . import defs
|
||||
from . import encodings, settings, registers # noqa
|
||||
from cdsl.isa import TargetISA # noqa
|
||||
|
||||
# Re-export the primary target ISA definition.
|
||||
ISA = defs.ISA.finish()
|
||||
ISA = defs.ISA.finish() # type: TargetISA
|
||||
|
||||
@@ -9,7 +9,7 @@ import base.instructions
|
||||
from . import instructions as x86
|
||||
from base.immediates import floatcc
|
||||
|
||||
ISA = TargetISA('x86', [base.instructions.GROUP, x86.GROUP])
|
||||
ISA = TargetISA('x86', [base.instructions.GROUP, x86.GROUP]) # type: TargetISA
|
||||
|
||||
# CPU modes for 32-bit and 64-bit operation.
|
||||
X86_64 = CPUMode('I64', ISA)
|
||||
|
||||
Reference in New Issue
Block a user