Skip to content

Commit

Permalink
Fix readme settings example (#1910)
Browse files Browse the repository at this point in the history
  • Loading branch information
Viicos authored Jan 18, 2024
1 parent 15a7f7e commit 3537321
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ So, mypy would not like this code:
```python
from django.conf import settings

settings.CUSTOM_VALUE # E: 'Settings' object has no attribute 'CUSTOM_SETTING'
settings.CUSTOM_VALUE # E: 'Settings' object has no attribute 'CUSTOM_VALUE'
```

To handle this corner case we have a special setting `strict_settings` (`True` by default),
Expand All @@ -328,7 +328,7 @@ And then:

```python
# Works:
reveal_type(settings.EXISTS_IN_RUNTIME) # N: Any
reveal_type(settings.EXISTS_AT_RUNTIME) # N: Any

# Errors:
reveal_type(settings.MISSING) # E: 'Settings' object has no attribute 'MISSING'
Expand Down

0 comments on commit 3537321

Please sign in to comment.