Converted sentinel types to use new sentinel class - #2131
Conversation
braingram
left a comment
There was a problem hiding this comment.
Thanks for making the updates. The use of sentinel helps to clean up the code.
Would you open an issue to track that we can use the builtin sentinel once our minimum python version is 3.15?
Ruff has a linter rule (UP035) that triggers for We use several other types from |
|
Thanks for pointing out the rule. The description says:
Testing by setting the ruff version to 3.15 it doesn't update sentinel (or report a rule violation). Perhaps the rule doesn't include sentinel yet. An issue seems more straightforward than relying on some ruff rule to be updated. #2132 |
Description
Closes #2122
typing-extensionsto4.16NOT_SETandUSE_INTERNALimplementation withsentinelNotSetTypeandUseInternaltype aliases sincesentinellets the value and type use the same nameAI Disclosure
No AI tools used.
Tasks
prekon your machinepyteston your machineno-changelog-entry-needed)changes/:echo "changed something" > changes/<PR#>.<changetype>.rst(see below for change types)docs/pagenews fragment change types...
changes/<PR#>.feature.rst: new featurechanges/<PR#>.bugfix.rst: bug fixchanges/<PR#>.doc.rst: documentation changechanges/<PR#>.removal.rst: deprecation or removal of public APIchanges/<PR#>.general.rst: infrastructure or miscellaneous change