black reformatting.
This commit is contained in:
parent
b0a94124d2
commit
7b3c8d2ba8
3 changed files with 31 additions and 39 deletions
|
|
@ -55,25 +55,20 @@ from libervia.frontends.tools.jid import JID
|
|||
log.basicConfig(level=log.WARNING, format="[%(name)s] %(message)s")
|
||||
###
|
||||
|
||||
|
||||
class CLISettings(config.FrontendSettings, key="cli"):
|
||||
background: Literal["auto", "dark", "light"] = Field(
|
||||
default="auto", description="Background handling strategy"
|
||||
)
|
||||
image_cmd: str|None = Field(
|
||||
image_cmd: str | None = Field(
|
||||
default=None,
|
||||
description="Command to use to display images. Must be avaialble in path."
|
||||
)
|
||||
editor: str = Field(
|
||||
default = os.getenv("EDITOR", "vi")
|
||||
)
|
||||
editor_args_opt: str|None = Field(
|
||||
default=None
|
||||
description="Command to use to display images. Must be avaialble in path.",
|
||||
)
|
||||
editor: str = Field(default=os.getenv("EDITOR", "vi"))
|
||||
editor_args_opt: str | None = Field(default=None)
|
||||
syntax_ext: dict = Field(default_factory=dict)
|
||||
blog_preview_open_cmd: str|None = Field(
|
||||
default=None
|
||||
)
|
||||
blog_preview_update_cmd: str|None = Field(
|
||||
blog_preview_open_cmd: str | None = Field(default=None)
|
||||
blog_preview_update_cmd: str | None = Field(
|
||||
default_factory=lambda data: data["blog_preview_open_cmd"]
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -769,9 +769,7 @@ class Edit(base.CommandBase, BlogPublishCommon, common.BaseEdit):
|
|||
|
||||
async def start(self):
|
||||
# if there are user defined extension, we use them
|
||||
SYNTAX_EXT.update(
|
||||
self.host.cli_settings.syntax_ext
|
||||
)
|
||||
SYNTAX_EXT.update(self.host.cli_settings.syntax_ext)
|
||||
self.current_syntax = await self.get_current_syntax()
|
||||
|
||||
(
|
||||
|
|
@ -948,9 +946,7 @@ class Preview(base.CommandBase, common.BaseEdit):
|
|||
else:
|
||||
aionotify = None
|
||||
|
||||
SYNTAX_EXT.update(
|
||||
self.host.cli_settings.syntax_ext
|
||||
)
|
||||
SYNTAX_EXT.update(self.host.cli_settings.syntax_ext)
|
||||
|
||||
self.open_cb_cmd = self.cli_settings.blog_preview_open_cmd
|
||||
if self.open_cb_cmd is None:
|
||||
|
|
|
|||
|
|
@ -288,7 +288,9 @@ class BaseEdit(object):
|
|||
|
||||
if len(content) == 0:
|
||||
self.disp("Content is empty, cancelling the edition")
|
||||
if content_file_path.parent != get_tmp_dir(self.host.settings, self.cat_dir):
|
||||
if content_file_path.parent != get_tmp_dir(
|
||||
self.host.settings, self.cat_dir
|
||||
):
|
||||
self.disp(
|
||||
"File are not in SàT temporary hierarchy, we do not remove them",
|
||||
2,
|
||||
|
|
|
|||
Loading…
Reference in a new issue