import sys
import uuid
from inspect import stack
+from typing import NoReturn
from pyutils import config, logging_utils
from pyutils.argparse_utils import ActionNoYes
def should_ignore_filename(filename: str) -> bool:
return "importlib" in filename or "six.py" in filename
- def find_module(self, fullname, path):
+ def find_module(self, fullname, path) -> NoReturn:
raise Exception(
"This method has been deprecated since Python 3.4, please upgrade."
)
"""
return in_str.lower() in {"true", "1", "yes", "y", "t", "on"}
- def _process_dynamic_args(self, event):
+ def _process_dynamic_args(self, event) -> None:
"""Invoked as a callback when a zk-based config changed."""
if not self.zk:
import time
import traceback
import warnings
-from typing import Any, Callable, List, Optional, Union
+from typing import Any, Callable, List, NoReturn, Optional, Union
# This module is commonly used by others in here and should avoid
# taking any unnecessary dependencies back on them.
# to be bound by the terms and conditions of this License Agreement.
-def _raise_exception(exception, error_message: Optional[str]):
+def _raise_exception(exception, error_message: Optional[str]) -> NoReturn:
"""Internal. Raise a deferred exception"""
if error_message is None:
raise Exception(exception)