Skip to content

Commit

Permalink
fix: update dependencies and deal with pyright delusions
Browse files Browse the repository at this point in the history
  • Loading branch information
vberlier committed Sep 1, 2021
1 parent f941557 commit be9ed6a
Show file tree
Hide file tree
Showing 9 changed files with 584 additions and 506 deletions.
4 changes: 2 additions & 2 deletions beet/core/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def ensure_serialized(
self.serializer = backup

self.set_content(content)
return content
return content # type: ignore

def ensure_deserialized(
self,
Expand All @@ -124,7 +124,7 @@ def ensure_deserialized(
self.deserializer = backup

self.set_content(content)
return content
return content # type: ignore

def __eq__(self, other: Any) -> bool:
if type(self) != type(other):
Expand Down
10 changes: 3 additions & 7 deletions beet/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,14 @@
import json
import re
from dataclasses import field
from typing import Any, Dict, Iterable, Iterator, List, Protocol, TypeVar, Union
from pathlib import PurePath
from typing import Any, Dict, Iterable, Iterator, List, TypeVar, Union

T = TypeVar("T")


class PathLike(Protocol):
def __fspath__(self) -> str:
...


JsonDict = Dict[str, Any]
FileSystemPath = Union[str, PathLike]
FileSystemPath = Union[str, PurePath]
TextComponent = Union[str, List[Any], JsonDict]


Expand Down
2 changes: 1 addition & 1 deletion beet/library/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def __exit__(self, *_):
self.save(overwrite=True)

def process(self, key: str, value: NamespaceType) -> NamespaceType:
value.bind(self, key)
value.bind(self, key) # type: ignore
return value

def missing(self, key: str) -> NamespaceType:
Expand Down
4 changes: 2 additions & 2 deletions beet/toolchain/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@

T = TypeVar("T")
U = TypeVar("U")
SendType = TypeVar("SendType", contravariant=True)
RecvType = TypeVar("RecvType", contravariant=True)
SendType = TypeVar("SendType")
RecvType = TypeVar("RecvType")
SelfType = TypeVar("SelfType")


Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"check": "poetry run pyright"
},
"devDependencies": {
"pyright": "^1.1.155"
"pyright": "^1.1.165"
}
}
Loading

0 comments on commit be9ed6a

Please sign in to comment.