sbdchd / celery-types

:seedling: Type stubs for Celery and its related packages
Apache License 2.0
81 stars 39 forks source link

typehint for `celery.app.Context.parent_id` incorrect #139

Closed Kakadus closed 1 year ago

Kakadus commented 1 year ago

Maybe I'm wrong, but I think Context.parent_id should be of type str | None instead of https://github.com/sbdchd/celery-types/blob/6d55b8cbf64d0fa8a6e8efe782aac3d7d39a384d/celery-stubs/app/task.pyi#L49

All other id-like fields are str | None and after a quick search, I found several places in celery, where str-variables are given as a named parameter called parent_id, like in celery.app.trace.build_tracer in the subfunction trace_task line 520.

I will create a PR soon.