-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
Description
PEP 688 (https://peps.python.org/pep-0688/#no-special-meaning-for-bytes) specifies that type checkers should stop treating bytes as implicitly equivalent to bytes | bytearray | memoryview. Mypy should implement this change.
We already have hidden flags to disable the promotions (added in #13952) and I have a draft PR that shows the impact of disabling them (#12661). I would suggest the following plan:
- Promote
--disable-bytearray-promotionand--disable-memoryview-promotionto public, documented flags now - The next time we increment mypy's major version number, flip the default
Reactions are currently unavailable