ITADN

Convert our `Empty` class usage to `typing_extensions.Sentinel`

#995Opensobolevn 创建于 2026-04-30
featuregood first issuehelp wanted
S
sobolevncommented
Current way: https://github.com/wemake-services/django-modern-rest/blob/5ca7975fb54112432769fe0b267773409ba78201/dmr/types.py#L48-L55 New (modern) way: https://typing-extensions.readthedocs.io/en/latest/#typing_extensions.Sentinel 1. We need to change how `EmptyObj` is defined to be `EMPTY: Final = Sentinel('EMPTY')` 2. We need to change all `isinstance(..., Empty)` to check for the sentinel This is a very easy task for new contributors :)
3 条评论