import json
import re
from copy import deepcopy
+from typing import Any, Dict, List, no_type_check
import cherrypy
import rados
EndpointDoc, ReadPermission, RESTController, Task, UiApiController, \
UpdatePermission
-try:
- from typing import Any, Dict, List, no_type_check
-except ImportError:
- no_type_check = object() # Just for type checking
-
ISCSI_SCHEMA = {
'user': (str, 'username'),
'password': (str, 'password'),
import logging
import re
from functools import partial
+from typing import no_type_check
import cherrypy
import rbd
EndpointDoc, ReadPermission, RESTController, Task, UpdatePermission, \
allow_empty_body
-try:
- from typing import no_type_check
-except ImportError:
- no_type_check = object() # Just for type checking
-
-
logger = logging.getLogger('controllers.rbd_mirror')
import json
from enum import Enum
+from typing import no_type_check
from . import PLUGIN_MANAGER as PM
from . import interfaces as I # noqa: E741,N812
from .plugin import SimplePlugin as SP
-try:
- from typing import no_type_check
-except ImportError:
- no_type_check = object() # Just for type checking
-
class Actions(Enum):
ENABLE = 'enable'
# -*- coding: utf-8 -*-
from enum import Enum
-from typing import List, Optional
+from typing import List, Optional, Set, no_type_check
import cherrypy
from mgr_module import CLICommand, Option
from . import interfaces as I # noqa: E741,N812
from .ttl_cache import ttl_cache
-try:
- from typing import Set, no_type_check
-except ImportError:
- no_type_check = object() # Just for type checking
-
class Features(Enum):
RBD = 'rbd'
+from typing import no_type_check
+
from mgr_module import Command, Option
from . import PLUGIN_MANAGER as PM
from . import interfaces as I # noqa: E741,N812
-try:
- from typing import no_type_check
-except ImportError:
- no_type_check = object() # Just for type checking
-
class SimplePlugin(I.CanMgr, I.HasOptions, I.HasCommands):
"""
deps =
cython
-rrequirements.txt
- mypy==0.812
+ mypy==0.901
+ types-backports
+ types-python-dateutil
+ types-requests
+ types-PyYAML
+ types-jwt
commands =
mypy --config-file=../../mypy.ini \
-m alerts \