python static code analysis #2637
AlexanderLanin
started this conversation in
Infrastructure Community
Replies: 1 comment
-
|
Appreciate the short investigation. Seems like a clear choice for now |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Random concrete example tested with 4 type checkers (an almost bug from eclipse-csi/otterdog#605).
Note: that this might be an unfair comparison, as we would never learn of bugs that mypy has prevented, which the others do not catch.
Code
The code in question forgets to call
pull_requestas a method.Should have been:
As a secondary bug,
merge_methodcan technically be undefined:Analyzers
Basedpypright - catches both bugs ✅

Pyright - catches both bugs ✅

Mypy - All I can get is a generic warning on Any. This is rather generic and useless. ❌

Ty - only the second part about merge_method being unbound ❌

Conclusion
basedpyright remains the best type checker today. mypy does not catch critical problems. ty is not ready.
@MaximilianSoerenPollak and all other python programmers :-)
Beta Was this translation helpful? Give feedback.
All reactions