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

fix: 主题配置文件圆角不生效#857

Merged
IsHPDuwu merged 1 commit into
Class-Widgets:mainfrom
IsHPDuwu:fix/theme.radius
Aug 13, 2025
Merged

fix: 主题配置文件圆角不生效#857
IsHPDuwu merged 1 commit into
Class-Widgets:mainfrom
IsHPDuwu:fix/theme.radius

Conversation

@IsHPDuwu

Copy link
Copy Markdown
Member

No description provided.

@github-actions

Copy link
Copy Markdown

🧪 静态检查结果

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

🕒 检查时间:2025-08-13 09:45:30 UTC / 2025-08-13 17:45:30 UTC+8
📝 触发提交信息000c415: "fix: 主题配置文件圆角不生效"
📁 检查的文件数:1 个 - main.py


🚨 严重错误

❌ PyLint 严重错误(点我展开)
main.py:800:8: E0606: Possibly using variable 'p_mgr' before assignment (possibly-used-before-assignment)
main.py:3197: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: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]
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]
cses_mgr.py:144: error: Cannot determine type of "timelines"  [has-type]
cses_mgr.py:145: error: Cannot determine type of "timelines"  [has-type]

📋 其他检查

🔍 PyLint 提示(点我展开)
************* Module main
main.py:132:15: C0303: Trailing whitespace (trailing-whitespace)
main.py:156:57: C0303: Trailing whitespace (trailing-whitespace)
main.py:157:53: C0303: Trailing whitespace (trailing-whitespace)
main.py:158:26: C0303: Trailing whitespace (trailing-whitespace)
main.py:160:31: C0303: Trailing whitespace (trailing-whitespace)
main.py:247:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:304:14: C0303: Trailing whitespace (trailing-whitespace)
main.py:357:80: C0303: Trailing whitespace (trailing-whitespace)
main.py:388:83: C0303: Trailing whitespace (trailing-whitespace)
main.py:435:0: W0311: Bad indentation. Found 36 spaces, expected 32 (bad-indentation)
main.py:461:53: C0303: Trailing whitespace (trailing-whitespace)
main.py:462:57: C0303: Trailing whitespace (trailing-whitespace)
main.py:463:57: C0303: Trailing whitespace (trailing-whitespace)
main.py:479:35: C0303: Trailing whitespace (trailing-whitespace)
main.py:485:0: C0325: Unnecessary parens after ':=' keyword (superfluous-parens)
main.py:615:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:729:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1303:0: W0311: Bad indentation. Found 17 spaces, expected 16 (bad-indentation)
main.py:1304:0: W0311: Bad indentation. Found 21 spaces, expected 20 (bad-indentation)
main.py:1305:0: W0311: Bad indentation. Found 21 spaces, expected 20 (bad-indentation)
main.py:1306:0: W0311: Bad indentation. Found 25 spaces, expected 24 (bad-indentation)
main.py:1308:0: W0311: Bad indentation. Found 25 spaces, expected 24 (bad-indentation)
main.py:1309:0: W0311: Bad indentation. Found 29 spaces, expected 28 (bad-indentation)
main.py:1310:0: W0311: Bad indentation. Found 25 spaces, expected 24 (bad-indentation)
main.py:1311:0: W0311: Bad indentation. Found 17 spaces, expected 16 (bad-indentation)
main.py:1312:0: W0311: Bad indentation. Found 21 spaces, expected 20 (bad-indentation)
main.py:1322:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1466:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1501:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1549:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1564:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1581:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1586:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1592:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1596:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1607:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1653:0: W0311: Bad indentation. Found 13 spaces, expected 12 (bad-indentation)
main.py:1666:34: C0303: Trailing whitespace (trailing-whitespace)
main.py:1801:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1812:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1820:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1992:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:1995:0: C0303: Trailing whitespace (trailing-whitespace)
main.py:2046:0: W0311: Bad indentation. Found 17 spaces, expected 16 (bad-indentation)
main.py:2047:0: W0311: Bad indentation. Found 21 spaces, expected 20 (bad-indentation)
main.py:2048:0: W0311: Bad indentation. Found 21 spaces, expected 20 (bad-indentation)
main.py:2049:0: W0311: Bad indentation. Found 25 spaces, expected 24 (bad-indentation)
main.py:2051:0: W0311: Bad indentation. Found 25 spaces, expected 24 (bad-indentation)
main.py:2052:0: W0311: Bad indentation. Found 29 spaces, expected 28 (bad-indentation)
🔍 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: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
menu.py:3411: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
menu.py:3411: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
main.py:1642: note: Right operand is of type "Optional[Any]"
main.py:3146: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
main.py:3146: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
Found 1003 errors in 16 files (checked 1 source file)

@baiyao105 baiyao105 requested a review from ChimeYao-bot August 13, 2025 09:48
@baiyao105

baiyao105 commented Aug 13, 2025

Copy link
Copy Markdown
Member

666
ai被\n干似了。

image

铸币gpt给我type hint弄错了

@baiyao105 baiyao105 requested review from ChimeYao-bot and removed request for ChimeYao-bot August 13, 2025 09:51
ChimeYao-bot

This comment was marked as duplicate.

@baiyao105

This comment was marked as duplicate.

@baiyao105

baiyao105 commented Aug 13, 2025

Copy link
Copy Markdown
Member

需要一个llm大神帮我修

@baiyao105 baiyao105 requested a review from ChimeYao-bot August 13, 2025 09:56

@ChimeYao-bot ChimeYao-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

.

@IsHPDuwu IsHPDuwu merged commit af2f970 into Class-Widgets:main Aug 13, 2025
12 checks passed
@baiyao105 baiyao105 requested a review from ChimeYao-bot August 13, 2025 10:56
ChimeYao-bot

This comment was marked as duplicate.

@baiyao105 baiyao105 requested a review from ChimeYao-bot August 13, 2025 11:32

@ChimeYao-bot ChimeYao-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🎉 AI代码审查报告

总体评分: 90.0/100
审查状态: ✅ 通过

总结: 代码变更改进了正则表达式的匹配模式,使其更灵活和健壮,同时保持了良好的可读性和维护性。

📊 问题统计

  • ℹ️ Info: 3

🤖 此审查由AI助手自动生成,详细评论请查看文件中的具体建议

Comment thread main.py Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Info: 正则表达式改进后能更好地匹配样式表中的border-radius属性

考虑将正则表达式模式提取为常量以提高可维护性

Comment thread main.py Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Info: 更新后的正则表达式允许空格和不同的单位格式

可以添加注释说明正则表达式改进的目的

Comment thread main.py Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Info: 样式更新操作缺少错误处理

考虑添加try-catch块处理可能的样式表解析错误

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.

3 participants