remove some asserts that could be validly triggered

This commit is contained in:
Maxim Kurnikov
2019-07-25 19:53:12 +03:00
parent 409c01eb24
commit 62dac1d468
10 changed files with 77 additions and 35 deletions

View File

@@ -33,4 +33,18 @@
reveal_type(settings.NOT_EXISTING)
out: |
main:2: note: Revealed type is 'Any'
main:2: error: 'Settings' object has no attribute 'NOT_EXISTING'
main:2: error: 'Settings' object has no attribute 'NOT_EXISTING'
- case: override_default_setting_with_different_type_in_the_different_module
custom_settings: |
from settings.basic_settings import *
main: |
from django.conf import settings
reveal_type(settings.MEDIA_ROOT) # N: Revealed type is 'pathlib.Path'
reveal_type(settings.MEDIA_ROOT / 'part') # N: Revealed type is 'pathlib.Path*'
files:
- path: settings/__init__.py
- path: settings/basic_settings.py
content: |
from pathlib import Path
MEDIA_ROOT = Path()