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]:
|
def __call__(self, mime: str) -> Callable[[], bytes]:
|
||||||
data = self.data.get(mime, b'')
|
data = self.data.get(mime, b'')
|
||||||
if isinstance(data, str): # type: ignore
|
if isinstance(data, str):
|
||||||
data = data.encode('utf-8') # type: ignore
|
data = data.encode('utf-8')
|
||||||
if isinstance(data, bytes):
|
if isinstance(data, bytes):
|
||||||
def chunker() -> bytes:
|
def chunker() -> bytes:
|
||||||
nonlocal data
|
nonlocal data
|
||||||
|
|||||||
@ -36,7 +36,7 @@ FontMap = Dict[str, Dict[str, List[FontConfigPattern]]]
|
|||||||
def create_font_map(all_fonts: Tuple[FontConfigPattern, ...]) -> FontMap:
|
def create_font_map(all_fonts: Tuple[FontConfigPattern, ...]) -> FontMap:
|
||||||
ans: FontMap = {'family_map': {}, 'ps_map': {}, 'full_map': {}}
|
ans: FontMap = {'family_map': {}, 'ps_map': {}, 'full_map': {}}
|
||||||
for x in all_fonts:
|
for x in all_fonts:
|
||||||
if 'path' not in x:
|
if not x.get('path'):
|
||||||
continue
|
continue
|
||||||
f = (x.get('family') or '').lower()
|
f = (x.get('family') or '').lower()
|
||||||
full = (x.get('full_name') or '').lower()
|
full = (x.get('full_name') or '').lower()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user