Changes to make updated mypy happy
This commit is contained in:
parent
9e35d26188
commit
dd07a8c4a4
@ -136,8 +136,8 @@ class Clipboard:
|
||||
|
||||
def __call__(self, mime: str) -> Callable[[], bytes]:
|
||||
data = self.data.get(mime, b'')
|
||||
if isinstance(data, str): # type: ignore
|
||||
data = data.encode('utf-8') # type: ignore
|
||||
if isinstance(data, str):
|
||||
data = data.encode('utf-8')
|
||||
if isinstance(data, bytes):
|
||||
def chunker() -> bytes:
|
||||
nonlocal data
|
||||
|
||||
@ -36,7 +36,7 @@ FontMap = Dict[str, Dict[str, List[FontConfigPattern]]]
|
||||
def create_font_map(all_fonts: Tuple[FontConfigPattern, ...]) -> FontMap:
|
||||
ans: FontMap = {'family_map': {}, 'ps_map': {}, 'full_map': {}}
|
||||
for x in all_fonts:
|
||||
if 'path' not in x:
|
||||
if not x.get('path'):
|
||||
continue
|
||||
f = (x.get('family') or '').lower()
|
||||
full = (x.get('full_name') or '').lower()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user