mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2025-03-04 08:43:58 +00:00
fix linter warnings
This commit is contained in:
parent
3e6a2a4f37
commit
ff275a5ba4
2 changed files with 2 additions and 2 deletions
|
@ -138,7 +138,7 @@ class Connection(SqlConnection):
|
||||||
params = {
|
params = {
|
||||||
"key": key,
|
"key": key,
|
||||||
"value": data.get(key, serialize = True),
|
"value": data.get(key, serialize = True),
|
||||||
"type": "LogLevel" if field.type == "logging.LogLevel" else field.type # type: ignore
|
"type": "LogLevel" if field.type == "logging.LogLevel" else field.type
|
||||||
}
|
}
|
||||||
|
|
||||||
with self.run("put-config", params):
|
with self.run("put-config", params):
|
||||||
|
|
|
@ -213,7 +213,7 @@ def cli_db_maintenance(ctx: click.Context) -> None:
|
||||||
def cli_convert(ctx: click.Context, old_config: str) -> None:
|
def cli_convert(ctx: click.Context, old_config: str) -> None:
|
||||||
"Convert an old config and jsonld database to the new format."
|
"Convert an old config and jsonld database to the new format."
|
||||||
|
|
||||||
old_config = Path(old_config).expanduser().resolve() if old_config else ctx.obj.config.path
|
old_config = str(Path(old_config).expanduser().resolve()) if old_config else ctx.obj.config.path
|
||||||
backup = ctx.obj.config.path.parent.joinpath(f"{ctx.obj.config.path.stem}.backup.yaml")
|
backup = ctx.obj.config.path.parent.joinpath(f"{ctx.obj.config.path.stem}.backup.yaml")
|
||||||
|
|
||||||
if str(old_config) == str(ctx.obj.config.path) and not backup.exists():
|
if str(old_config) == str(ctx.obj.config.path) and not backup.exists():
|
||||||
|
|
Loading…
Reference in a new issue