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

feat(weather): Open-Meteo支持#805

Merged
IsHPDuwu merged 16 commits into
Class-Widgets:mainfrom
IsHPDuwu:feat/weather.open-meteo
Aug 2, 2025
Merged

feat(weather): Open-Meteo支持#805
IsHPDuwu merged 16 commits into
Class-Widgets:mainfrom
IsHPDuwu:feat/weather.open-meteo

Conversation

@IsHPDuwu

@IsHPDuwu IsHPDuwu commented Jul 29, 2025

Copy link
Copy Markdown
Member

close #400

@github-actions

github-actions Bot commented Jul 29, 2025

Copy link
Copy Markdown

🧪 静态检查结果

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

🕒 检查时间:2025-08-02 13:11:45 UTC / 2025-08-02 21:11:45 UTC+8
📝 触发提交信息eb26b37: "feat: flyout"
📁 检查的文件数:4 个 - main.py,menu.py,network_thread.py,weather.py


🚨 严重错误

❌ PyLint 严重错误(点我展开)
main.py:804:8: E0606: Possibly using variable 'p_mgr' before assignment (possibly-used-before-assignment)
main.py:960:26: E0606: Possibly using variable 'app' before assignment (possibly-used-before-assignment)
main.py:2691:30: E0606: Possibly using variable 'pygetwindow' before assignment (possibly-used-before-assignment)
❌ MyPy 严重错误(点我展开)
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]
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]
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:523: error: Incompatible return value type (got "float", expected "int")  [return-value]
utils.py:597: error: Incompatible types in assignment (expression has type "datetime", variable has type "Optional[float]")  [assignment]
utils.py:631: error: Unsupported operand types for - ("float" and "None")  [operator]
utils.py:632: error: Returning Any from function declared to return "datetime"  [no-any-return]
utils.py:632: error: Unsupported operand types for + ("float" and "timedelta")  [operator]
utils.py:657: error: Incompatible return value type (got "float", expected "int")  [return-value]
utils.py:692: error: Incompatible return value type (got "Optional[float]", expected "Optional[datetime]")  [return-value]
utils.py:726: error: Unexpected keyword argument "config" for "TimeManagerInterface"  [call-arg]
list_.py:118: error: Need type annotation for "not_exist_themes" (hint: "not_exist_themes: List[<type>] = ...")  [var-annotated]
list_.py:212: error: Missing return statement  [return]
list_.py:229: error: Returning Any from function declared to return "str"  [no-any-return]
list_.py:315: error: Argument 1 to "len" has incompatible type "Optional[Any]"; expected "Sized"  [arg-type]
list_.py:368: error: Returning Any from function declared to return "List[str]"  [no-any-return]
conf.py:79: error: Returning Any from function declared to return "Optional[Dict[str, Any]]"  [no-any-return]
conf.py:87: error: Item "None" of "Optional[Dict[str, Any]]" has no attribute "update"  [union-attr]
conf.py:98: error: Incompatible types in assignment (expression has type "Dict[str, List[Any]]", variable has type "List[Any]")  [assignment]
conf.py:127: error: Argument 1 to "Path" has incompatible type "Optional[str]"; expected "Union[str, PathLike[str]]"  [arg-type]
conf.py:172: error: Incompatible types in assignment (expression has type "Path", variable has type "str")  [assignment]
conf.py:173: error: Incompatible types in assignment (expression has type "Union[Path, str]", variable has type "str")  [assignment]
conf.py:176: error: Argument 1 to "Path" has incompatible type "Optional[str]"; expected "Union[str, PathLike[str]]"  [arg-type]
conf.py:179: error: "str" has no attribute "stem"  [attr-defined]
conf.py:186: error: "str" has no attribute "parent"  [attr-defined]
conf.py:192: error: Argument 1 to "join" has incompatible type "Optional[str]"; expected "str"  [arg-type]
conf.py:205: error: Incompatible types in assignment (expression has type "float", variable has type "int")  [assignment]
conf.py:292: 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]
cses_mgr.py:50: error: Missing type parameters for generic type "Dict"  [type-arg]
cses_mgr.py:134: error: Need type annotation for "class_counter_dict" (hint: "class_counter_dict: Dict[<type>, <type>] = ...")  [var-annotated]
cses_mgr.py:135: error: Cannot determine type of "parts"  [has-type]
cses_mgr.py:136: error: Cannot determine type of "part_names"  [has-type]
cses_mgr.py:137: error: Cannot determine type of "parts"  [has-type]

📋 其他检查

🔍 PyLint 提示(点我展开)
************* Module main
main.py:136:15: C0303: Trailing whitespace (trailing-whitespace)
main.py:160:57: C0303: Trailing whitespace (trailing-whitespace)
main.py:161:53: C0303: Trailing whitespace (trailing-whitespace)
main.py:162:26: C0303: Trailing whitespace (trailing-whitespace)
main.py:164:31: C0303: Trailing whitespace (trailing-whitespace)
main.py:251:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:308:14: C0303: Trailing whitespace (trailing-whitespace)
main.py:361:80: C0303: Trailing whitespace (trailing-whitespace)
main.py:392:83: C0303: Trailing whitespace (trailing-whitespace)
main.py:439:0: W0311: Bad indentation. Found 36 spaces, expected 32 (bad-indentation)
main.py:465:53: C0303: Trailing whitespace (trailing-whitespace)
main.py:466:57: C0303: Trailing whitespace (trailing-whitespace)
main.py:467:57: C0303: Trailing whitespace (trailing-whitespace)
main.py:483:35: C0303: Trailing whitespace (trailing-whitespace)
main.py:489:0: C0325: Unnecessary parens after ':=' keyword (superfluous-parens)
main.py:619:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:733:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1293:0: W0311: Bad indentation. Found 17 spaces, expected 16 (bad-indentation)
main.py:1294:0: W0311: Bad indentation. Found 21 spaces, expected 20 (bad-indentation)
main.py:1295:0: W0311: Bad indentation. Found 21 spaces, expected 20 (bad-indentation)
main.py:1296:0: W0311: Bad indentation. Found 25 spaces, expected 24 (bad-indentation)
main.py:1298:0: W0311: Bad indentation. Found 25 spaces, expected 24 (bad-indentation)
main.py:1299:0: W0311: Bad indentation. Found 29 spaces, expected 28 (bad-indentation)
main.py:1300:0: W0311: Bad indentation. Found 25 spaces, expected 24 (bad-indentation)
main.py:1301:0: W0311: Bad indentation. Found 17 spaces, expected 16 (bad-indentation)
main.py:1302:0: W0311: Bad indentation. Found 21 spaces, expected 20 (bad-indentation)
main.py:1312:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1456:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1491:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1539:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1554:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1571:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1576:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1582:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1586:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1597:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1643:0: W0311: Bad indentation. Found 13 spaces, expected 12 (bad-indentation)
main.py:1656:34: C0303: Trailing whitespace (trailing-whitespace)
main.py:1788:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1931:0: W0311: Bad indentation. Found 17 spaces, expected 16 (bad-indentation)
main.py:1932:0: W0311: Bad indentation. Found 21 spaces, expected 20 (bad-indentation)
main.py:1933:0: W0311: Bad indentation. Found 21 spaces, expected 20 (bad-indentation)
main.py:1934:0: W0311: Bad indentation. Found 25 spaces, expected 24 (bad-indentation)
main.py:1936:0: W0311: Bad indentation. Found 25 spaces, expected 24 (bad-indentation)
main.py:1937:0: W0311: Bad indentation. Found 29 spaces, expected 28 (bad-indentation)
main.py:1938:0: W0311: Bad indentation. Found 25 spaces, expected 24 (bad-indentation)
main.py:1939:0: W0311: Bad indentation. Found 17 spaces, expected 16 (bad-indentation)
main.py:1940:0: W0311: Bad indentation. Found 21 spaces, expected 20 (bad-indentation)
main.py:1990:79: 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:631: note: Right operand is of type "Optional[float]"
.venv/lib/python3.8/site-packages/mypy/typeshed/stdlib/builtins.pyi:110: note: "TimeManagerInterface" defined here
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:2706: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
menu.py:2706: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
menu.py:2715: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
menu.py:2715: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
main.py:1632: note: Right operand is of type "Optional[Any]"
Found 886 errors in 15 files (checked 4 source files)

@IsHPDuwu IsHPDuwu added test/required/MacOS 需要在MacOS系统中进行测试 test/required/Linux 需要在Linux系统中进行测试 test/accepted/Windows 在Windows系统中已通过测试 labels Jul 29, 2025
@IsHPDuwu

This comment was marked as resolved.

@IsHPDuwu IsHPDuwu added test/failed/any 在any系统中未通过测试/存在问题 and removed test/required/MacOS 需要在MacOS系统中进行测试 test/required/Linux 需要在Linux系统中进行测试 test/accepted/Windows 在Windows系统中已通过测试 labels Jul 29, 2025
@IsHPDuwu IsHPDuwu requested review from baiyao105 and pizeroLOL July 29, 2025 08:03
@IsHPDuwu

This comment was marked as resolved.

@baiyao105

Copy link
Copy Markdown
Member

问号。

@IsHPDuwu IsHPDuwu added test/accepted/any 在any系统中已通过测试 and removed test/failed/any 在any系统中未通过测试/存在问题 labels Jul 30, 2025
@baiyao105 baiyao105 changed the title feat: Open-Meteo 天气 feat(weather): Open-Meteo支持 Jul 30, 2025

@baiyao105 baiyao105 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果只有定位的话,选择城市的控件没做提醒和禁用。

@IsHPDuwu IsHPDuwu self-assigned this Aug 1, 2025
@IsHPDuwu IsHPDuwu merged commit 941fd9a into Class-Widgets:main Aug 2, 2025
8 of 9 checks passed
pizeroLOL pushed a commit to pizeroLOL/Class-Widgets that referenced this pull request Aug 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

test/accepted/any 在any系统中已通过测试

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: 天气兼容 Open-Meteo

2 participants