We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c48fd6 commit b5c4580Copy full SHA for b5c4580
CONTRIBUTING.md
@@ -286,6 +286,15 @@ Two exceptions are `Protocol` and `runtime_checkable`: although
286
these were added in Python 3.8, they can be used in stubs regardless
287
of Python version.
288
289
+[PEP 688](https://www.python.org/dev/peps/pep-0688/), which is
290
+currently a draft, removes the implicit promotion of the
291
+`bytearray` and `memoryview` classes to `bytes`.
292
+Typeshed stubs should be written assuming that this proposal
293
+is accepted, so a parameter that accepts either `bytes` or
294
+`bytearray` should be typed as `bytes | bytearray`.
295
+Often one of the aliases from `_typeshed`, such as
296
+`_typeshed.ReadableBuffer`, can be used instead.
297
+
298
### What to include
299
300
Stubs should include the complete interface (classes, functions,
0 commit comments