mirror of
https://github.com/django-components/django-components.git
synced 2025-07-17 05:24:59 +00:00
Reformat lines that became too long. And enforce 119 line length.
This commit is contained in:
parent
ef6a082238
commit
48fe8171b4
25 changed files with 314 additions and 733 deletions
|
@ -26,9 +26,7 @@ class AppSettings:
|
|||
|
||||
@property
|
||||
def CONTEXT_BEHAVIOR(self):
|
||||
raw_value = self.settings.setdefault(
|
||||
"context_behavior", ContextBehavior.GLOBAL.value
|
||||
)
|
||||
raw_value = self.settings.setdefault("context_behavior", ContextBehavior.GLOBAL.value)
|
||||
return self._validate_context_behavior(raw_value)
|
||||
|
||||
def _validate_context_behavior(self, raw_value):
|
||||
|
@ -36,9 +34,7 @@ class AppSettings:
|
|||
return ContextBehavior(raw_value)
|
||||
except ValueError:
|
||||
valid_values = [behavior.value for behavior in ContextBehavior]
|
||||
raise ValueError(
|
||||
f"Invalid context behavior: {raw_value}. Valid options are {valid_values}"
|
||||
)
|
||||
raise ValueError(f"Invalid context behavior: {raw_value}. Valid options are {valid_values}")
|
||||
|
||||
|
||||
app_settings = AppSettings()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue