Fix a couple of issues highlighted by updated mypy
This commit is contained in:
parent
af15b0313a
commit
1a2d9c6fba
@ -161,7 +161,7 @@ def highlight_collection(collection: Collection, aliases: Optional[Dict[str, str
|
|||||||
if p:
|
if p:
|
||||||
is_binary = isinstance(data_for_path(p), bytes)
|
is_binary = isinstance(data_for_path(p), bytes)
|
||||||
if not is_binary:
|
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):
|
for future in concurrent.futures.as_completed(jobs):
|
||||||
path = jobs[future]
|
path = jobs[future]
|
||||||
try:
|
try:
|
||||||
|
|||||||
@ -36,6 +36,8 @@ def images_supported() -> bool:
|
|||||||
|
|
||||||
class Ref:
|
class Ref:
|
||||||
|
|
||||||
|
__slots__: Tuple[str, ...] = ()
|
||||||
|
|
||||||
def __setattr__(self, name: str, value: object) -> None:
|
def __setattr__(self, name: str, value: object) -> None:
|
||||||
raise AttributeError("can't set attribute")
|
raise AttributeError("can't set attribute")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user