mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-07 04:34:29 +08:00
remove some asserts that could be validly triggered
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user