Fix broken for akkoma list

This commit is contained in:
Ngô Ngọc Đức Huy 2023-12-20 21:10:26 +07:00
parent 324e0f5a32
commit d7da2de99a
Signed by: xarvos
GPG key ID: 904AF1C7CDF695C3
2 changed files with 14 additions and 11 deletions

View file

@ -1,19 +1,22 @@
from itertools import chain
import json
import sys
import platform
import sys
from datetime import datetime, timedelta, timezone
from itertools import chain
from time import sleep, time
from witchie import api, config, __version__
from witchie.auth import login_interactive, login_browser_interactive, create_app_interactive
from witchie import __version__, api, config
from witchie.auth import (create_app_interactive, login_browser_interactive,
login_interactive)
from witchie.entities import Account, Instance, Notification, Status, from_dict
from witchie.exceptions import ApiError, ConsoleError
from witchie.output import (print_lists, print_out, print_instance, print_account, print_acct_list,
print_search_results, print_status, print_table, print_timeline, print_notifications,
print_tag_list, print_list_accounts, print_user_list)
from witchie.utils import args_get_instance, delete_tmp_status_file, editor_input, multiline_input, EOF_KEY
from witchie.output import (print_account, print_acct_list, print_instance,
print_list_accounts, print_lists,
print_notifications, print_out,
print_search_results, print_status, print_table,
print_tag_list, print_timeline, print_user_list)
from witchie.utils import (EOF_KEY, args_get_instance, delete_tmp_status_file,
editor_input, multiline_input)
from witchie.utils.datetime import parse_datetime

View file

@ -142,7 +142,7 @@ def print_err(*args, **kwargs):
def print_instance(instance: Instance):
print_out(f"<green>{instance.title}</green>")
print_out(f"<blue>{instance.uri}</blue>")
print_out(f"running Mastodon {instance.version}")
print_out(f"running Mastodon API v{instance.version}")
print_out()
if instance.description:
@ -226,7 +226,7 @@ def print_tag_list(tags):
def print_lists(lists):
headers = ["ID", "Title", "Replies"]
data = [[lst["id"], lst["title"], lst["replies_policy"]] for lst in lists]
data = [[lst["id"], lst["title"], lst.get("replies_policy", "")] for lst in lists]
print_table(headers, data)