Remove default function arguments when possible

merge-requests/30/head
Bob Mottram 2024-04-30 15:05:39 +01:00
parent c06ccff83d
commit 8f8de8bd04
2 changed files with 65 additions and 31 deletions

View File

@ -721,26 +721,35 @@ def run_daemon(no_of_books: int,
blogs_instance: bool,
media_instance: bool,
max_recent_posts: int,
enable_shared_inbox: bool, registration: bool,
language: str, project_version: str,
instance_id: str, client_to_server: bool,
base_dir: str, domain: str,
onion_domain: str, i2p_domain: str,
enable_shared_inbox: bool,
registration: bool,
language: str,
project_version: str,
instance_id: str,
client_to_server: bool,
base_dir: str,
domain: str,
onion_domain: str,
i2p_domain: str,
yt_replace_domain: str,
twitter_replacement_domain: str,
port: int = 80, proxy_port: int = 80,
http_prefix: str = 'https',
fed_list: [] = [],
max_mentions: int = 10, max_emoji: int = 10,
secure_mode: bool = False,
proxy_type: str = None, max_replies: int = 64,
domain_max_posts_per_day: int = 8640,
account_max_posts_per_day: int = 864,
allow_deletion: bool = False,
debug: bool = False, unit_test: bool = False,
instance_only_skills_search: bool = False,
send_threads: [] = [],
manual_follower_approval: bool = True) -> None:
port: int,
proxy_port: int,
http_prefix: str,
fed_list: [],
max_mentions: int,
max_emoji: int,
secure_mode: bool,
proxy_type: str,
max_replies: int,
domain_max_posts_per_day: int,
account_max_posts_per_day: int,
allow_deletion: bool,
debug: bool,
unit_test: bool,
instance_only_skills_search: bool,
send_threads: [],
manual_follower_approval: bool) -> None:
if len(domain) == 0:
domain = 'localhost'
if '.' not in domain:

View File

@ -1164,34 +1164,59 @@ def create_server_eve(path: str, domain: str, port: int, federation_list: [],
max_shares_on_profile = 8
public_replies_unlisted = False
no_of_books = 10
domain_max_posts_per_day = 1000
account_max_posts_per_day = 1000
print('Server running: Eve')
run_daemon(no_of_books, public_replies_unlisted,
max_shares_on_profile, max_hashtags, map_format,
clacks, preferred_podcast_formats,
run_daemon(no_of_books,
public_replies_unlisted,
max_shares_on_profile,
max_hashtags,
map_format,
clacks,
preferred_podcast_formats,
check_actor_timeout,
crawlers_allowed,
dyslexic_font,
content_license_url,
lists_enabled, default_reply_interval_hrs,
low_bandwidth, max_like_count,
lists_enabled,
default_reply_interval_hrs,
low_bandwidth,
max_like_count,
shared_items_federated_domains,
user_agents_blocked,
log_login_failures, city,
log_login_failures,
city,
show_node_info_accounts,
show_node_info_version,
broch_mode,
verify_all_signatures,
send_threads_timeout_mins,
dormant_months, max_newswire_posts,
dormant_months,
max_newswire_posts,
allow_local_network_access,
2048, False, True, False, False, True, max_followers,
2048, False, True, False, False, True,
max_followers,
0, 100, 1024, 5, False, 0,
False, 1, False, False, False,
5, True, True, 'en', __version__,
"instance_id", False, path, domain,
onion_domain, i2p_domain, None, None, port, port,
http_prefix, federation_list, max_mentions, max_emoji, False,
proxy_type, max_replies, allow_deletion, True, True, False,
5, True, True,
'en', __version__,
"instance_id", False,
path, domain,
onion_domain,
i2p_domain,
None, None,
port, port,
http_prefix,
federation_list,
max_mentions,
max_emoji,
False,
proxy_type,
max_replies,
domain_max_posts_per_day,
account_max_posts_per_day,
allow_deletion,
True, True, False,
send_threads, False)