Fix a couple of issues highlighted by updated mypy

This commit is contained in:
Kovid Goyal 2022-04-28 07:03:35 +05:30
parent af15b0313a
commit 1a2d9c6fba
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 1 deletions

View File

@ -161,7 +161,7 @@ def highlight_collection(collection: Collection, aliases: Optional[Dict[str, str
if p:
is_binary = isinstance(data_for_path(p), bytes)
if not is_binary:
jobs[executor.submit(highlight_for_diff, p, aliases)] = p
jobs[executor.submit(highlight_for_diff, p, aliases or {})] = p
for future in concurrent.futures.as_completed(jobs):
path = jobs[future]
try:

View File

@ -36,6 +36,8 @@ def images_supported() -> bool:
class Ref:
__slots__: Tuple[str, ...] = ()
def __setattr__(self, name: str, value: object) -> None:
raise AttributeError("can't set attribute")