-
-
Notifications
You must be signed in to change notification settings - Fork 978
Chore: 修正错误的声明 #3213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Chore: 修正错误的声明 #3213
Conversation
|
在整个代码库中,将已弃用的类型构造 (List, Dict, Optional, Union, Tuple) 替换为内置泛型类型和 PEP 604 联合语法 这个其实可以ruff check --fix直接自动修了(这类问题修了3000+处)(详见:#3214 ) |
|
要想用ruff自动修这些问题,需要先启用这些规则才行,目前没启用这些规则,所以没有自动修正 |
|
那些是precommit修改文件时强行修的。 |
不是,我的意思是ruff check --fix前提是pyproject.toml启用了这些规则,不然就没法自动修复,执行ruff check --fix会告诉你全部通过. |
这个ruff没启用规则目前没修,但是precommit中的pyupgrade在修。 |
我启用规则然后自动修复的那个pr你看可以直接合并吧,应该没什么问题吧 |
|
type hint我之前也打算修过,确实工程量有点大 |
量有点大 |
008ea1f to
11eb0b9
Compare
Merge branch 'master' into chore-pyright-fix
Motivation / 动机
补全声明的过程中发现不少已有的左右脑互博的声明。
万里江山一片红(Error)
计划先初步修正声明,修复部分转换直到Pyright检查完全通过。
Modifications / 改动点
修正错误的声明。
通过静态检查。
Verification Steps / 验证步骤
Screenshots or Test Results / 运行截图或测试结果
Compatibility & Breaking Changes / 兼容性与破坏性变更
Checklist / 检查清单
requirements.txt和pyproject.toml文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations inrequirements.txtandpyproject.toml.Sourcery 总结
在整个代码库中优化类型注解并修正错误的声明,以解决静态类型检查错误并提高整体类型一致性。
改进点:
Original summary in English
Summary by Sourcery
Refine type annotations and correct erroneous declarations across the entire codebase to resolve static type-checking errors and improve overall typing consistency.
Enhancements: