Skip to content

Fix UnsetType type annotation (#916) - #917

Closed
CharString wants to merge 1 commit into
msgspec:mainfrom
CharString:main
Closed

CharString wants to merge 1 commit into
msgspec:mainfrom
CharString:main

Conversation

@CharString

Copy link
Copy Markdown

This is consistent with the definition in _core.c:

static int unset_bool(PyObject *obj) {
    return 0;
};

static PyNumberMethods unset_as_number = {
    .nb_bool = unset_bool,
};

PyTypeObject Unset_Type = {
    PyVarObject_HEAD_INIT(NULL, 0)
    .tp_name = "msgspec.UnsetType",
    .tp_doc = unset__doc__,
    .tp_repr = unset_repr,
    .tp_flags = Py_TPFLAGS_DEFAULT,
    .tp_methods = unset_methods,
    .tp_as_number = &unset_as_number,
    .tp_new = unset_new,
    .tp_dealloc = 0,
    .tp_itemsize = 0,
    .tp_basicsize = 0
};

@CharString

Copy link
Copy Markdown
Author

Closes #916 But #975 has no merge conflicts and does practically the same

@CharString CharString closed this Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant