2 Star 18 Fork 1

swiftycode/clitheme

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
frontend_fallback.py 1.53 KB
一键复制 编辑 原始数据 按行查看 历史
swiftycode 提交于 2024-06-21 00:39 . Rename fallback and demo files
"""
clitheme fallback frontend for version 2.0 (returns fallback values for all functions)
"""
from typing import Optional
data_path=""
global_domain=""
global_appname=""
global_subsections=""
global_debugmode=False
global_lang=""
global_disablelang=False
alt_path=None
alt_path_dirname=None
alt_path_hash=None
def set_local_themedef(file_content: str, overlay: bool=False) -> bool:
"""Fallback set_local_themedef function (always returns False)"""
return False
def unset_local_themedef():
"""Fallback unset_local_themedef function"""
return
class FetchDescriptor():
"""
Object containing domain and app information used for fetching entries
"""
def __init__(self, domain_name: Optional[str] = None, app_name: Optional[str] = None, subsections: Optional[str] = None, lang: Optional[str] = None, debug_mode: Optional[bool] = None, disable_lang: Optional[bool] = None):
"""Fallback init function"""
return
def retrieve_entry_or_Fallback(self, entry_path: str, fallback_string: str) -> str:
"""Fallback retrieve_entry_or_Fallback function (always return Fallback string)"""
return fallback_string
reof=retrieve_entry_or_Fallback # a shorter alias of the function
def format_entry_or_fallback(self, entry_path: str, fallback_string: str, *args, **kwargs) -> str:
return fallback_string.format(*args, **kwargs)
feof=format_entry_or_fallback
def entry_exists(self, entry_path: str) -> bool:
"""Fallback entry_exists function (always return false)"""
return False
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/swiftycode/clitheme.git
git@gitee.com:swiftycode/clitheme.git
swiftycode
clitheme
clitheme
latest-STABLE

搜索帮助

0d507c66 1850385 C8b1a773 1850385