|
227 | 227 | - path: myapp/__init__.py |
228 | 228 | - path: myapp/models/__init__.py |
229 | 229 | content: | |
230 | | - from .app import App |
| 230 | + from .app import App as App |
231 | 231 | - path: myapp/models/app.py |
232 | 232 | content: | |
233 | 233 | from django.db import models |
|
254 | 254 | - path: myapp/__init__.py |
255 | 255 | - path: myapp/models/__init__.py |
256 | 256 | content: | |
257 | | - from .user import User |
| 257 | + from .user import User as User |
258 | 258 | - path: myapp/models/user.py |
259 | 259 | content: | |
260 | 260 | from django.db import models |
|
279 | 279 | - path: myapp/__init__.py |
280 | 280 | - path: myapp/models/__init__.py |
281 | 281 | content: | |
282 | | - from .user import User |
283 | | - from .profile import Profile |
284 | | - from .app import App |
| 282 | + from .user import User as User |
| 283 | + from .profile import Profile as Profile |
| 284 | + from .app import App as App |
285 | 285 | - path: myapp/models/user.py |
286 | 286 | content: | |
287 | 287 | from django.db import models |
|
466 | 466 | - path: myapp/__init__.py |
467 | 467 | - path: myapp/models/__init__.py |
468 | 468 | content: | |
469 | | - from .publisher import Publisher |
470 | | - from .book import Book |
| 469 | + from .publisher import Publisher as Publisher |
| 470 | + from .book import Book as Book |
471 | 471 | - path: myapp/models/publisher.py |
472 | 472 | content: | |
473 | 473 | from django.db import models |
|
489 | 489 | - path: myapp/__init__.py |
490 | 490 | - path: myapp/models/__init__.py |
491 | 491 | content: | |
492 | | - from .book import Book |
| 492 | + from .book import Book as Book |
493 | 493 | - path: myapp/models/publisher.py |
494 | 494 | content: | |
495 | 495 | from django.db import models |
|
836 | 836 | reveal_type(Order().products) # N: Revealed type is "myapp.models.Product_RelatedManager" |
837 | 837 | reveal_type(Order().products.get()) # N: Revealed type is "myapp.models.Product" |
838 | 838 | reveal_type(Order().products.queryset_method()) # N: Revealed type is "builtins.int" |
839 | | - if 1 == 2: |
| 839 | + cond: bool |
| 840 | + if cond: |
840 | 841 | manager = User().products |
841 | 842 | else: |
842 | 843 | manager = Order().products |
|
1338 | 1339 | - path: myapp/__init__.py |
1339 | 1340 | - path: myapp/models/__init__.py |
1340 | 1341 | content: | |
1341 | | - from .child import Child |
1342 | | - from .parent import Parent |
| 1342 | + from .child import Child as Child |
| 1343 | + from .parent import Parent as Parent |
1343 | 1344 | - path: myapp/models/parent.py |
1344 | 1345 | content: | |
1345 | 1346 | from django.db import models |
|
0 commit comments