document link and update

This commit is contained in:
晴猫
2026-03-21 12:13:01 +09:00
parent e66b2eb662
commit 0ecb201ad5
2 changed files with 5 additions and 0 deletions

View File

@@ -31,3 +31,7 @@
1. 应该尽量减少使用getattr和setattr方法除非是在对一个动态类进行处理或者使用Monkeypatch完成Pytest 1. 应该尽量减少使用getattr和setattr方法除非是在对一个动态类进行处理或者使用Monkeypatch完成Pytest
2. 在重构代码时如果遇到getattr和setattr应该尝试检查这个类实例是否有这个属性如果有则直接替换为类属性访问写法。 2. 在重构代码时如果遇到getattr和setattr应该尝试检查这个类实例是否有这个属性如果有则直接替换为类属性访问写法。
- 举例:`v = getattr(instance, "value", "")` 在检查到`instance``value`属性后应该改为`v = instance.value` - 举例:`v = getattr(instance, "value", "")` 在检查到`instance``value`属性后应该改为`v = instance.value`
# 运行/调试/构建/测试/依赖
优先使用uv
依赖项以 pyproject.toml 为准

1
CLAUDE.md Symbolic link
View File

@@ -0,0 +1 @@
AGENTS.md