From 0bbeed572609d174a51552243fe5a7848d4f61d3 Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Sun, 29 Dec 2024 19:04:50 -0800 Subject: [PATCH] Enable strict_bytes by default --- mypy/main.py | 6 +++--- mypy/options.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mypy/main.py b/mypy/main.py index 9873907ddf03a..241a37dc2cc0d 100644 --- a/mypy/main.py +++ b/mypy/main.py @@ -870,9 +870,9 @@ def add_invertible_flag( ) add_invertible_flag( - "--strict-bytes", - default=False, - strict_flag=False, + "--no-strict-bytes", + default=True, + dest="strict_bytes", help="Disable treating bytearray and memoryview as subtypes of bytes", group=strictness_group, ) diff --git a/mypy/options.py b/mypy/options.py index eb3d389b5d8a5..4d79d6b2d4393 100644 --- a/mypy/options.py +++ b/mypy/options.py @@ -217,7 +217,7 @@ def __init__(self) -> None: self.strict_equality = False # Disable treating bytearray and memoryview as subtypes of bytes - self.strict_bytes = False + self.strict_bytes = True # Deprecated, use extra_checks instead. self.strict_concatenate = False