Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

feat(about): Weblate翻译按钮#838

Merged
baiyao105 merged 2 commits into
Class-Widgets:mainfrom
baiyao105:feat-about.weblate
Aug 11, 2025
Merged

feat(about): Weblate翻译按钮#838
baiyao105 merged 2 commits into
Class-Widgets:mainfrom
baiyao105:feat-about.weblate

Conversation

@baiyao105

Copy link
Copy Markdown
Member

pyproject配置看笑了。

image

@baiyao105 baiyao105 requested a review from IsHPDuwu August 11, 2025 05:56
@github-actions

github-actions Bot commented Aug 11, 2025

Copy link
Copy Markdown

🧪 静态检查结果

检查已完成(16872666039) - [🔄 PR检查],以下为结果

🕒 检查时间:2025-08-11 06:35:14 UTC / 2025-08-11 14:35:14 UTC+8
📝 触发提交信息b9080b1: "。"
📁 检查的文件数:1 个 - menu.py


🚨 严重错误

❌ PyLint 严重错误(点我展开)
menu.py:1252:30: E1136: Value 'list' is unsubscriptable (unsubscriptable-object)
❌ MyPy 严重错误(点我展开)
generate_speech.py:119: error: Returning Any from function declared to return "Optional[str]"  [no-any-return]
generate_speech.py:502: error: Call to untyped function "EdgeTTSProvider" in typed context  [no-untyped-call]
generate_speech.py:503: error: Call to untyped function "Pyttsx3Provider" in typed context  [no-untyped-call]
generate_speech.py:688: error: Incompatible types in assignment (expression has type "Optional[str]", variable has type "str")  [assignment]
generate_speech.py:693: error: Incompatible types in assignment (expression has type "None", variable has type "str")  [assignment]
generate_speech.py:771: error: Incompatible types in assignment (expression has type "Optional[str]", variable has type "str")  [assignment]
generate_speech.py:776: error: Incompatible types in assignment (expression has type "None", variable has type "str")  [assignment]
file.py:198: error: Incompatible default for argument "old_section" (default has type "None", argument has type "str")  [assignment]
file.py:198: error: Incompatible default for argument "old_key" (default has type "None", argument has type "str")  [assignment]
file.py:198: error: Incompatible default for argument "new_section" (default has type "None", argument has type "str")  [assignment]
file.py:199: error: Incompatible default for argument "new_key" (default has type "None", argument has type "str")  [assignment]
utils.py:77: error: Item "None" of "Optional[SingleInstanceGuard]" has no attribute "release"  [union-attr]
utils.py:116: error: Item "None" of "Optional[SingleInstanceGuard]" has no attribute "release"  [union-attr]
utils.py:241: error: Unsupported operand types for < ("datetime" and "float")  [operator]
utils.py:242: error: Unsupported operand types for >= ("datetime" and "float")  [operator]
utils.py:245: error: Argument "seconds" to "timedelta" has incompatible type "Union[float, datetime]"; expected "float"  [arg-type]
utils.py:524: error: Incompatible return value type (got "float", expected "int")  [return-value]
utils.py:598: error: Incompatible types in assignment (expression has type "datetime", variable has type "Optional[float]")  [assignment]
utils.py:632: error: Unsupported operand types for - ("float" and "None")  [operator]
utils.py:633: error: Returning Any from function declared to return "datetime"  [no-any-return]
utils.py:633: error: Unsupported operand types for + ("float" and "timedelta")  [operator]
utils.py:658: error: Incompatible return value type (got "float", expected "int")  [return-value]
utils.py:693: error: Incompatible return value type (got "Optional[float]", expected "Optional[datetime]")  [return-value]
utils.py:727: error: Unexpected keyword argument "config" for "TimeManagerInterface"  [call-arg]
list_.py:117: error: Need type annotation for "not_exist_themes" (hint: "not_exist_themes: List[<type>] = ...")  [var-annotated]
list_.py:210: error: Missing return statement  [return]
list_.py:227: error: Returning Any from function declared to return "str"  [no-any-return]
list_.py:313: error: Argument 1 to "len" has incompatible type "Optional[Any]"; expected "Sized"  [arg-type]
list_.py:365: error: Returning Any from function declared to return "List[str]"  [no-any-return]
conf.py:80: error: Returning Any from function declared to return "Optional[Dict[str, Any]]"  [no-any-return]
conf.py:88: error: Item "None" of "Optional[Dict[str, Any]]" has no attribute "update"  [union-attr]
conf.py:99: error: Incompatible types in assignment (expression has type "Dict[str, List[Any]]", variable has type "List[Any]")  [assignment]
conf.py:128: error: Argument 1 to "Path" has incompatible type "Optional[str]"; expected "Union[str, PathLike[str]]"  [arg-type]
conf.py:173: error: Incompatible types in assignment (expression has type "Path", variable has type "str")  [assignment]
conf.py:174: error: Incompatible types in assignment (expression has type "Union[Path, str]", variable has type "str")  [assignment]
conf.py:177: error: Argument 1 to "Path" has incompatible type "Optional[str]"; expected "Union[str, PathLike[str]]"  [arg-type]
conf.py:180: error: "str" has no attribute "stem"  [attr-defined]
conf.py:187: error: "str" has no attribute "parent"  [attr-defined]
conf.py:193: error: Argument 1 to "join" has incompatible type "Optional[str]"; expected "str"  [arg-type]
conf.py:206: error: Incompatible types in assignment (expression has type "float", variable has type "int")  [assignment]
conf.py:293: error: Need type annotation for "plugin_dict" (hint: "plugin_dict: Dict[<type>, <type>] = ...")  [var-annotated]
play_audio.py:71: error: Module "conf" does not explicitly export attribute "base_directory"  [attr-defined]
play_audio.py:97: error: Module "conf" does not explicitly export attribute "base_directory"  [attr-defined]
play_audio.py:107: error: Module "conf" does not explicitly export attribute "base_directory"  [attr-defined]
play_audio.py:181: error: Call to untyped function "AudioManager" in typed context  [no-untyped-call]
i18n_manager.py:51: error: Call to untyped function "scan_available_languages" in typed context  [no-untyped-call]
i18n_manager.py:60: error: Call to untyped function "_get_language_display_name" in typed context  [no-untyped-call]
i18n_manager.py:74: error: Call to untyped function "_get_language_display_name" in typed context  [no-untyped-call]
i18n_manager.py:121: error: Call to untyped function "_get_language_display_name" in typed context  [no-untyped-call]
i18n_manager.py:125: error: Call to untyped function "_get_language_display_name" in typed context  [no-untyped-call]

📋 其他检查

🔍 PyLint 提示(点我展开)
************* Module menu
menu.py:35:100: C0303: Trailing whitespace (trailing-whitespace)
menu.py:43:109: C0303: Trailing whitespace (trailing-whitespace)
menu.py:44:109: C0303: Trailing whitespace (trailing-whitespace)
menu.py:45:101: C0303: Trailing whitespace (trailing-whitespace)
menu.py:60:29: C0303: Trailing whitespace (trailing-whitespace)
menu.py:61:86: C0303: Trailing whitespace (trailing-whitespace)
menu.py:80:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:102:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:105:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:112:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:140:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:145:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:153:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:190:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:202:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:228:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:231:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:233:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:237:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:243:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:249:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:254:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:256:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:264:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:535:48: C0303: Trailing whitespace (trailing-whitespace)
menu.py:546:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:672:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:707:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:778:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:955:0: C0325: Unnecessary parens after 'not' keyword (superfluous-parens)
menu.py:959:22: C0303: Trailing whitespace (trailing-whitespace)
menu.py:994:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1040:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1151:0: C0325: Unnecessary parens after '=' keyword (superfluous-parens)
menu.py:1312:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1322:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1368:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1413:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1701:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1784:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1810:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1823:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1829:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1834:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1844:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1872:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1890:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1894:17: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1906:0: C0303: Trailing whitespace (trailing-whitespace)
🔍 MyPy 提示(点我展开)
file.py:198: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
file.py:198: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
file.py:199: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
file.py:199: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
utils.py:241: note: Right operand is of type "Union[float, datetime]"
utils.py:242: note: Right operand is of type "Union[float, datetime]"
utils.py:632: note: Right operand is of type "Optional[float]"
.venv/lib/python3.8/site-packages/mypy/typeshed/stdlib/builtins.pyi:110: note: "TimeManagerInterface" defined here
weather.py:684: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
weather.py:684: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
weather.py:1715: note: "Dict" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
weather.py:1715: note: Consider using "Mapping" instead, which is covariant in the value type
weather.py:1715: note: Perhaps you need a type annotation for "result"? Suggestion: "Dict[str, Optional[str]]"
weather.py:1718: note: "Dict" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
weather.py:1718: note: Consider using "Mapping" instead, which is covariant in the value type
weather.py:1718: note: Perhaps you need a type annotation for "result"? Suggestion: "Dict[str, Optional[str]]"
weather.py:2296: note: "Dict" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
weather.py:2296: note: Consider using "Mapping" instead, which is covariant in the value type
weather.py:2296: note: Perhaps you need a type annotation for "aqi_data"? Suggestion: "Dict[str, Optional[str]]"
weather.py:2338: note: "Dict" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
weather.py:2338: note: Consider using "Mapping" instead, which is covariant in the value type
weather.py:2338: note: Perhaps you need a type annotation for "aqi_data"? Suggestion: "Dict[str, Optional[str]]"
network_thread.py:460: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
network_thread.py:460: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
menu.py:1594: note: Possible overload variants:
menu.py:1594: note:     def setParent(self, parent: QWidget) -> None
menu.py:1594: note:     def setParent(self, parent: QWidget, f: Union[WindowFlags, WindowType]) -> None
menu.py:3342: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
menu.py:3342: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
menu.py:3351: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
menu.py:3351: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
Found 720 errors in 14 files (checked 1 source file)

@baiyao105 baiyao105 merged commit 1a38bab into Class-Widgets:main Aug 11, 2025
12 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants