fixes to dis stubs (#1025)

- Add sys.version_info checks (mypy now supports them)
- Went over Python 3 docs and corrected a few things
- Reexport things that are imported from opcode
This commit is contained in:
Jelle Zijlstra
2017-03-18 14:50:31 -07:00
committed by Jukka Lehtosalo
parent 5898d75913
commit cb7949b14e
2 changed files with 46 additions and 44 deletions

View File

@@ -1,4 +1,4 @@
from typing import List, Dict, Sequence
from typing import List, Dict, Optional, Sequence
import sys
@@ -17,7 +17,7 @@ HAVE_ARGUMENT = ... # type: int
EXTENDED_ARG = ... # type: int
if sys.version_info >= (3, 4):
def stack_effect(opcode: int, oparg: int = ...) -> int: ...
def stack_effect(opcode: int, oparg: Optional[int] = ...) -> int: ...
if sys.version_info >= (3, 6):
hasnargs = ... # type: List[int]