Skip to content

Commit 0bbeed5

Browse files
committed
Enable strict_bytes by default
1 parent ac6151a commit 0bbeed5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mypy/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -870,9 +870,9 @@ def add_invertible_flag(
870870
)
871871

872872
add_invertible_flag(
873-
"--strict-bytes",
874-
default=False,
875-
strict_flag=False,
873+
"--no-strict-bytes",
874+
default=True,
875+
dest="strict_bytes",
876876
help="Disable treating bytearray and memoryview as subtypes of bytes",
877877
group=strictness_group,
878878
)

mypy/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def __init__(self) -> None:
217217
self.strict_equality = False
218218

219219
# Disable treating bytearray and memoryview as subtypes of bytes
220-
self.strict_bytes = False
220+
self.strict_bytes = True
221221

222222
# Deprecated, use extra_checks instead.
223223
self.strict_concatenate = False

0 commit comments

Comments
 (0)