You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Book(publisher_id=1, publisher_with_char_pk_id=1) # E: Incompatible type for "publisher_with_char_pk_id" of "Book" (got "int", expected "Union[str, Combinable]")
80
+
Book(publisher_id=1, publisher_with_char_pk_id=1)
81
+
Book(publisher_id=1, publisher_with_char_pk_id='hello') # E: Incompatible type for "publisher_with_char_pk_id" of "Book" (got "str", expected "Union[int, Combinable, Literal['']]")
82
82
[out]
83
83
84
84
[CASE setting_value_to_an_array_of_ints]
@@ -112,9 +112,9 @@ class MyModel(models.Model):
112
112
MyModel(1)
113
113
114
114
class MyModel2(models.Model):
115
-
name = models.CharField(max_length=100)
116
-
MyModel2(1, 'Maxim')
117
-
MyModel2(1, 12) # E: Incompatible type for "name" of "MyModel2" (got "int", expected "Union[str, Combinable]")
115
+
name = models.IntegerField()
116
+
MyModel2(1, 12)
117
+
MyModel2(1, 'Maxim') # E: Incompatible type for "name" of "MyModel2" (got "str", expected "Union[int, Combinable, Literal['']]")
0 commit comments