mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Don't import enum in Python 2 stubs (#5445)
Python 2.7 doesn't have enum in the stdlib, in particular, so we shouldn't import it.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import enum
|
||||
import sys
|
||||
from typing import AnyStr, List, Optional, Text, Type, Union
|
||||
|
||||
@@ -12,6 +11,7 @@ class PyCompileError(Exception):
|
||||
def __init__(self, exc_type: Type[BaseException], exc_value: BaseException, file: str, msg: str = ...) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
import enum
|
||||
class PycInvalidationMode(enum.Enum):
|
||||
TIMESTAMP: int = ...
|
||||
CHECKED_HASH: int = ...
|
||||
|
||||
Reference in New Issue
Block a user