From 8b79e2fcd460d48593f51fa7ee9c402d6df36a26 Mon Sep 17 00:00:00 2001 From: Niels Buwen Date: Fri, 13 Mar 2020 15:57:05 +0100 Subject: [PATCH] mypy --- skillbridge/client/functions.py | 2 +- skillbridge/client/translator.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/skillbridge/client/functions.py b/skillbridge/client/functions.py index 6b49667..113b483 100644 --- a/skillbridge/client/functions.py +++ b/skillbridge/client/functions.py @@ -20,7 +20,7 @@ def __repr__(self) -> str: return f"\n{dir(self)}" @lru_cache(maxsize=128) - def __dir__(self) -> List[str]: + def __dir__(self) -> List[str]: # type: ignore code = self._translate.encode_globals(self._prefix) result = self._channel.send(code) functions = self._translate.decode_globals(result) diff --git a/skillbridge/client/translator.py b/skillbridge/client/translator.py index 1bcd4eb..ecdbe4b 100644 --- a/skillbridge/client/translator.py +++ b/skillbridge/client/translator.py @@ -1,4 +1,4 @@ -from typing import NoReturn, Any, List, Iterable, cast +from typing import NoReturn, Any, List, Iterable, cast, Match from re import sub, findall from json import dumps, loads from warnings import warn_explicit @@ -28,7 +28,7 @@ def _skill_value_to_python(string: str, replicate: Replicator) -> Skill: ) -def _upper_without_first(match: Any) -> str: +def _upper_without_first(match: Match[str]) -> str: return match.group()[1:].upper()