From 2b001e1ec614ff76276e14fe243f978b21c78409 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 31 Oct 2019 13:06:26 +0000 Subject: [PATCH] `' '` -> `" "` --- src/utils/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/__init__.py b/src/utils/__init__.py index 834c6139..477d8e59 100644 --- a/src/utils/__init__.py +++ b/src/utils/__init__.py @@ -258,7 +258,7 @@ class CaseInsensitiveDict(dict): if isinstance(key, str): return dict.__contains__(self, key.lower()) else: - raise TypeError('Expected string, not %r' % (key,)) + raise TypeError("Expected string, not %r" % key) def get(self, key: str, default: typing.Any=None): return dict.get(self, key.lower(), default) @@ -402,11 +402,11 @@ def deadline(seconds: int=10): signal.signal(signal.SIGALRM, old_handler) signal.setitimer(signal.ITIMER_REAL, old_seconds, 0) -DeadlineProcessReturnType = typing.TypeVar('DeadlineProcessReturnType') +DeadlineProcessReturnType = typing.TypeVar("DeadlineProcessReturnType") def deadline_process(func: typing.Callable[[], DeadlineProcessReturnType], seconds: int=10) -> DeadlineProcessReturnType: - q: multiprocessing.Queue[typing.Tuple[bool, DeadlineProcessReturnType]] = \ - multiprocessing.Queue() + q: multiprocessing.Queue[ + typing.Tuple[bool, DeadlineProcessReturnType]] = multiprocessing.Queue() def _wrap(func, q): try: q.put([True, func()])