Skip to content

Commit 048def6

Browse files
deal with type-arg error in test code
1 parent 538786b commit 048def6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test-data/unit/check-flags.test

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2417,7 +2417,9 @@ f(memoryview(b"asdf"))
24172417
[builtins fixtures/primitives.pyi]
24182418

24192419
[case testStrictBytesEnabledByStrict]
2420-
# flags: --strict
2420+
# flags: --strict --disable-error-code type-arg
2421+
# The type-arg thing is just work around the primitives.pyi isinstance Tuple not having type parameters,
2422+
# which isn't important for this.
24212423
def f(x: bytes) -> None: ...
24222424
f(bytearray(b"asdf")) # E: Argument 1 to "f" has incompatible type "bytearray"; expected "bytes"
24232425
f(memoryview(b"asdf")) # E: Argument 1 to "f" has incompatible type "memoryview"; expected "bytes"

0 commit comments

Comments
 (0)