Skip to content

Commit 0dd49b4

Browse files
committed
pre-commit fix
1 parent d6198d4 commit 0dd49b4

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

aldryn_config.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,36 @@ class Form(forms.BaseForm):
77
required=False,
88
)
99
content_css = forms.CharField(
10-
'List of CSS files to be used to apply style to editor content',
10+
"List of CSS files to be used to apply style to editor content",
1111
required=False,
1212
)
1313

1414
def clean(self):
1515
data = super().clean()
1616

17-
if data.get('content_css'):
18-
files = data['content_css'].split(',')
19-
data['content_css'] = [item.strip() for item in files if item]
17+
if data.get("content_css"):
18+
files = data["content_css"].split(",")
19+
data["content_css"] = [item.strip() for item in files if item]
2020
return data
2121

2222
def to_settings(self, data, settings):
2323
ckeditor_settings = {
24-
'height': 300,
25-
'language': '{{ language }}',
26-
'toolbar': 'CMS',
27-
'skin': 'moono-lisa',
24+
"height": 300,
25+
"language": "{{ language }}",
26+
"toolbar": "CMS",
27+
"skin": "moono-lisa",
2828
}
2929

30-
if data.get('content_css'):
31-
ckeditor_settings['contentsCss'] = data['content_css']
30+
if data.get("content_css"):
31+
ckeditor_settings["contentsCss"] = data["content_css"]
3232
else:
33-
ckeditor_settings['contentsCss'] = ['/static/css/base.css']
33+
ckeditor_settings["contentsCss"] = ["/static/css/base.css"]
3434

35-
style_set = ''
36-
if data.get('style_set'):
37-
style_set = data['style_set']
35+
style_set = ""
36+
if data.get("style_set"):
37+
style_set = data["style_set"]
3838

39-
ckeditor_settings['stylesSet'] = f'default:{style_set}'
39+
ckeditor_settings["stylesSet"] = f"default:{style_set}"
4040

41-
settings['CKEDITOR_SETTINGS'] = ckeditor_settings
41+
settings["CKEDITOR_SETTINGS"] = ckeditor_settings
4242
return settings

djangocms_text_ckeditor/fields.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
class HTMLField(TextHTMLField): # pragma: no cover
99
def __init__(self, *args: Any, **kwargs: Any) -> None:
1010
warnings.warn(
11-
"djangocms_text_ckeditor.fields.HTMLField is deprecated. "
12-
"Use djangocms_text.fields.HTMLField instead.",
11+
"djangocms_text_ckeditor.fields.HTMLField is deprecated. Use djangocms_text.fields.HTMLField instead.",
1312
DeprecationWarning,
1413
stacklevel=2,
1514
)

0 commit comments

Comments
 (0)