* Fixes CI

* Fixes CI

* Fixes CI
This commit is contained in:
Nikita Sobolev
2021-10-19 14:10:25 +03:00
committed by GitHub
parent fb12560981
commit 7ac33f3a28
7 changed files with 8 additions and 41 deletions

View File

@@ -52,12 +52,8 @@
b_instance = B()
reveal_type(b_instance.b_attr) # N: Revealed type is "builtins.int"
reveal_type(b_instance.non_existent_attribute)
b_instance.non_existent_attribute = 2
out: |
main:5: note: Revealed type is "Any"
main:5: error: "B" has no attribute "non_existent_attribute"
main:6: error: "B" has no attribute "non_existent_attribute"
b_instance.non_existent_attribute # E: "B" has no attribute "non_existent_attribute"
b_instance.non_existent_attribute = 2 # E: "B" has no attribute "non_existent_attribute"
installed_apps:
- myapp
files:

View File

@@ -18,11 +18,9 @@
reveal_type(MyUser._meta.get_field('base_name')) # N: Revealed type is "django.db.models.fields.CharField[Any, Any]"
reveal_type(MyUser._meta.get_field('name')) # N: Revealed type is "django.db.models.fields.CharField[Any, Any]"
reveal_type(MyUser._meta.get_field('age')) # N: Revealed type is "django.db.models.fields.IntegerField[Any, Any]"
reveal_type(MyUser._meta.get_field('unknown'))
reveal_type(MyUser._meta.get_field('to_user')) # N: Revealed type is "django.db.models.fields.related.ForeignKey[Any, Any]"
out: |
main:5: note: Revealed type is "Any"
main:5: error: MyUser has no field named 'unknown'
MyUser._meta.get_field('unknown') # E: MyUser has no field named 'unknown'
installed_apps:
- myapp
files: