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

feat(weather): 经纬度校验#843

Merged
IsHPDuwu merged 2 commits into
Class-Widgets:mainfrom
IsHPDuwu:fix/weather.lat_lon_check
Aug 11, 2025
Merged

feat(weather): 经纬度校验#843
IsHPDuwu merged 2 commits into
Class-Widgets:mainfrom
IsHPDuwu:fix/weather.lat_lon_check

Conversation

@IsHPDuwu

Copy link
Copy Markdown
Member

No description provided.

@github-actions

Copy link
Copy Markdown

🧪 静态检查结果

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

🕒 检查时间:2025-08-11 09:26:33 UTC / 2025-08-11 17:26:33 UTC+8
📝 触发提交信息472c910: "feat: 经纬度校验"
📁 检查的文件数:2 个 - menu.py,plugin.py


🚨 严重错误

❌ PyLint 严重错误(点我展开)
menu.py:1303: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: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:55: error: Call to untyped function "load_completed_i18n_config" in typed context  [no-untyped-call]
i18n_manager.py:56: error: Call to untyped function "scan_available_languages" in typed context  [no-untyped-call]
i18n_manager.py:63: error: Call to untyped function "_get_language_display_name" in typed context  [no-untyped-call]
i18n_manager.py:69: error: Call to untyped function "_get_language_display_name" in typed context  [no-untyped-call]
i18n_manager.py:148: error: Call to untyped function "_get_language_display_name" in typed context  [no-untyped-call]
i18n_manager.py:152: error: Call to untyped function "_get_language_display_name" in typed context  [no-untyped-call]
i18n_manager.py:162: error: Call to untyped function "clear_translators" 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:129:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:132:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:139:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:169:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:174:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:182:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:219:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:231:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:257:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:260:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:262:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:266:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:272:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:278:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:283:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:285:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:293:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:571:48: C0303: Trailing whitespace (trailing-whitespace)
menu.py:574:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:597:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:723:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:758:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:829:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1006:0: C0325: Unnecessary parens after 'not' keyword (superfluous-parens)
menu.py:1010:22: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1045:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1091:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1202:0: C0325: Unnecessary parens after '=' keyword (superfluous-parens)
menu.py:1363:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1373:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1419:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1464:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1752:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1835:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1861:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1874:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1880:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1885:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1895:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1923:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1941:0: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1945:17: C0303: Trailing whitespace (trailing-whitespace)
menu.py:1957: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:1645: note: Possible overload variants:
menu.py:1645: note:     def setParent(self, parent: QWidget) -> None
menu.py:1645: note:     def setParent(self, parent: QWidget, f: Union[WindowFlags, WindowType]) -> None
menu.py:3393: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
menu.py:3393: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
menu.py:3402: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
menu.py:3402: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
Found 692 errors in 14 files (checked 2 source files)

@IsHPDuwu IsHPDuwu merged commit b710a4e 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