Syntax warning due to comparison of literals using is in Python 3.8
还没有人认领这个 Issue。
评估
调研方向
从 xblock/test/test_runtime.py 的第 459-460 行开始,这里 Python 3.8 报告了使用 is 比较字面量的情况。运行 issue 中的 Python 3.8 -Wall 编译命令,然后确认这些警告不再出现,并且测试文件仍然通过。
由索引模型根据 Issue 内容生成。
描述
find . -iname '*.py' | grep -Ev 'setup|rdf4|tool' | xargs -P4 -I{} python3.8 -Wall -m py_compile {}
./xblock/test/test_runtime.py:459: SyntaxWarning: "is" with a literal. Did you mean "=="?
assert 1 is self.mixologist.mix(FieldTester).number
./xblock/test/test_runtime.py:460: SyntaxWarning: "is" with a literal. Did you mean "=="?
assert 1 is self.mixologist.mix(FieldTester).fields['field'].default
- 主要语言
- Python
- 星标
- 471
- 派生
- 231
- 平均合并
- 2 天 20 小时
- 30 天内合并 PR
- 9
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
openedx/XBlock 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
-
performance
难度 5/5 一周以上 新手友好度 35/100
-
难度 2/5 1-3 小时 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
[DEPR]: Support for XBlock Runtimes with raw string scope IDs可能已有人在做 @salman2013 于 221 天前认领。 未关闭depr
相似的 Issue
-
documentation good first issue help wanted
难度 2/5 1-3 小时 新手友好度 72/100
drevendev/HungryCrab#273 ·
维护者通常 1 天内回复
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 76/100
drevendev/BeautifulRepo#19 ·
维护者通常 2 天内回复
-
Moonshot: Kimi K3 always sends `reasoning_effort="max"`, though the API now accepts `low` and `high`未关闭accepted
难度 2/5 1-3 小时 新手友好度 78/100
UKGovernmentBEIS/inspect_ai#5939 ·
维护者通常 1 天内回复
-
bug linux
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
area:data data-quality
难度 2/5 1-3 小时 新手友好度 68/100
reacher-z/Awesome-CUA#1468 ·
维护者通常 1 天内回复