mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-31 07:33:51 +00:00
chore: add some explanations and explicit check callouts to mypy ignores
Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This commit is contained in:
parent
6df600f014
commit
d443607d65
4 changed files with 18 additions and 12 deletions
|
|
@ -77,7 +77,9 @@ def typeannotation(
|
|||
"""
|
||||
|
||||
def wrap(cls: Type[T]) -> Type[T]:
|
||||
cls.__repr__ = _compact_dataclass_repr # type: ignore
|
||||
# mypy fails to equate bound-y functions (first argument interpreted as
|
||||
# the bound object) with class methods, hence the `ignore` directive.
|
||||
cls.__repr__ = _compact_dataclass_repr # type: ignore[method-assign]
|
||||
if not dataclasses.is_dataclass(cls):
|
||||
cls = dataclasses.dataclass( # type: ignore[call-overload]
|
||||
cls,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue