|
1 | | -conformant = "Pass" |
| 1 | +conformant = "Partial" |
| 2 | +notes = """ |
| 3 | +`NewType`s are considered classes, not functions. |
| 4 | +""" |
2 | 5 | output = """ |
3 | 6 | aliases_newtype.py:11: error: Argument 1 to "UserId" has incompatible type "str"; expected "int" [arg-type] |
4 | 7 | aliases_newtype.py:12: error: Incompatible types in assignment (expression has type "int", variable has type "UserId") [assignment] |
5 | | -aliases_newtype.py:20: error: Cannot use isinstance() with NewType type [misc] |
6 | | -aliases_newtype.py:23: error: Cannot subclass "NewType" [misc] |
7 | | -aliases_newtype.py:32: error: String argument 1 "BadName" to NewType(...) does not match variable name "GoodName" [misc] |
8 | | -aliases_newtype.py:38: error: "GoodNewType1" expects no type arguments, but 1 given [type-arg] |
9 | | -aliases_newtype.py:44: error: Argument 2 to NewType(...) must be subclassable (got "int | str") [valid-newtype] |
10 | | -aliases_newtype.py:47: error: Type variable "aliases_newtype.T" is unbound [valid-type] |
11 | | -aliases_newtype.py:47: note: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class) |
12 | | -aliases_newtype.py:47: note: (Hint: Use "T" in function signature to bind "T" inside a function) |
13 | | -aliases_newtype.py:49: error: NewType cannot be used with protocol classes [misc] |
14 | | -aliases_newtype.py:51: error: Argument 2 to NewType(...) must be subclassable (got "Literal[7]") [valid-newtype] |
15 | | -aliases_newtype.py:58: error: Argument 2 to NewType(...) must be subclassable (got "TD1") [valid-newtype] |
16 | | -aliases_newtype.py:60: error: NewType(...) expects exactly two positional arguments [misc] |
17 | | -aliases_newtype.py:62: error: Argument 2 to NewType(...) must be subclassable (got "Any") [valid-newtype] |
| 8 | +aliases_newtype.py:23: error: Cannot use isinstance() with NewType type [misc] |
| 9 | +aliases_newtype.py:26: error: Cannot subclass "NewType" [misc] |
| 10 | +aliases_newtype.py:35: error: String argument 1 "BadName" to NewType(...) does not match variable name "GoodName" [misc] |
| 11 | +aliases_newtype.py:41: error: "GoodNewType1" expects no type arguments, but 1 given [type-arg] |
| 12 | +aliases_newtype.py:47: error: Argument 2 to NewType(...) must be subclassable (got "int | str") [valid-newtype] |
| 13 | +aliases_newtype.py:50: error: Type variable "aliases_newtype.T" is unbound [valid-type] |
| 14 | +aliases_newtype.py:50: note: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class) |
| 15 | +aliases_newtype.py:50: note: (Hint: Use "T" in function signature to bind "T" inside a function) |
| 16 | +aliases_newtype.py:52: error: NewType cannot be used with protocol classes [misc] |
| 17 | +aliases_newtype.py:54: error: Argument 2 to NewType(...) must be subclassable (got "Literal[7]") [valid-newtype] |
| 18 | +aliases_newtype.py:61: error: Argument 2 to NewType(...) must be subclassable (got "TD1") [valid-newtype] |
| 19 | +aliases_newtype.py:63: error: NewType(...) expects exactly two positional arguments [misc] |
| 20 | +aliases_newtype.py:65: error: Argument 2 to NewType(...) must be subclassable (got "Any") [valid-newtype] |
18 | 21 | """ |
19 | | -conformance_automated = "Pass" |
| 22 | +conformance_automated = "Fail" |
20 | 23 | errors_diff = """ |
| 24 | +Line 18: Expected 1 errors |
21 | 25 | """ |
0 commit comments