-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
The monkeypatches mentioned in https://github.com/sbdchd/celery-types/blob/main/README.md#install and #157 (comment) are necessary to get rid of Need type annotation for "task" [var-annotated] typecheck errors. There is an open pull-request to get rid of the monkeypatches in the long run, but as I mentioned in that PR, I wonder why the method should not return a Generic.
I suspect that the correct monkeypatch would have been
Celery.__class_getitem__ = classmethod(types.GenericAlias) # type: ignore[attr-defined]
Task.__class_getitem__ = classmethod(types.GenericAlias) # type: ignore[attr-defined]
...
Can someone please clarify?
Metadata
Metadata
Assignees
Labels
No labels