mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-02-21 17:18:31 +08:00
@@ -63,10 +63,7 @@
|
||||
main: |
|
||||
from myapp.models import User
|
||||
reveal_type(User().my_pk) # N: Revealed type is "builtins.int*"
|
||||
reveal_type(User().id)
|
||||
out: |
|
||||
main:3: note: Revealed type is "Any"
|
||||
main:3: error: "User" has no attribute "id"
|
||||
User().id # E: "User" has no attribute "id"
|
||||
installed_apps:
|
||||
- myapp
|
||||
files:
|
||||
|
||||
@@ -130,10 +130,7 @@
|
||||
main: |
|
||||
from myapp.models import View
|
||||
reveal_type(View().app.views) # N: Revealed type is "django.db.models.manager.RelatedManager[myapp.models.View]"
|
||||
reveal_type(View().app.unknown)
|
||||
out: |
|
||||
main:3: note: Revealed type is "Any"
|
||||
main:3: error: "App" has no attribute "unknown"
|
||||
View().app.unknown # E: "App" has no attribute "unknown"
|
||||
installed_apps:
|
||||
- myapp
|
||||
- myapp2
|
||||
|
||||
Reference in New Issue
Block a user