Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a basic pyright config (#2610)
### What This PR adds a Pyright config file that makes Pyright somewhat useable, at least for the purpose of checking our SDK's type support. For example, with this config, the following command returns usable output: ``` $ pyright tests/python/test_api/main.py /Users/hhip/src/rerun/tests/python/test_api/main.py /Users/hhip/src/rerun/tests/python/test_api/main.py:388:20 - error: "imread" is not a known member of module "cv2" (reportGeneralTypeIssues) /Users/hhip/src/rerun/tests/python/test_api/main.py:388:41 - error: "IMREAD_UNCHANGED" is not a known member of module "cv2" (reportGeneralTypeIssues) /Users/hhip/src/rerun/tests/python/test_api/main.py:390:20 - error: "cvtColor" is not a known member of module "cv2" (reportGeneralTypeIssues) /Users/hhip/src/rerun/tests/python/test_api/main.py:390:43 - error: "COLOR_BGRA2RGBA" is not a known member of module "cv2" (reportGeneralTypeIssues) /Users/hhip/src/rerun/tests/python/test_api/main.py:392:19 - error: "cvtColor" is not a known member of module "cv2" (reportGeneralTypeIssues) /Users/hhip/src/rerun/tests/python/test_api/main.py:392:42 - error: "COLOR_RGBA2RGB" is not a known member of module "cv2" (reportGeneralTypeIssues) /Users/hhip/src/rerun/tests/python/test_api/main.py:394:20 - error: "cvtColor" is not a known member of module "cv2" (reportGeneralTypeIssues) /Users/hhip/src/rerun/tests/python/test_api/main.py:394:42 - error: "COLOR_RGB2GRAY" is not a known member of module "cv2" (reportGeneralTypeIssues) /Users/hhip/src/rerun/tests/python/test_api/main.py:480:25 - error: "rec" is possibly unbound (reportUnboundVariable) /Users/hhip/src/rerun/tests/python/test_api/main.py:487:22 - error: Object of type "Unbound" cannot be used with "with" because it does not implement __enter__ (reportGeneralTypeIssues) /Users/hhip/src/rerun/tests/python/test_api/main.py:487:22 - error: Object of type "Unbound" cannot be used with "with" because it does not implement __exit__ (reportGeneralTypeIssues) /Users/hhip/src/rerun/tests/python/test_api/main.py:487:22 - error: "rec" is possibly unbound (reportUnboundVariable) 12 errors, 0 warnings, 0 informations ``` (Notably, no `rr`-related error :tada:) I know, yet another top-level file. I tried very hard to move it to `scripts/` or `rerun_py/pyproject.toml`, but I couldn't get it to work properly and would always defaults to spamming hundreds of errors. ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/2610) (if applicable) - [PR Build Summary](https://build.rerun.io/pr/2610) - [Docs preview](https://rerun.io/preview/pr%3Aantoine%2Fpyright-config/docs) - [Examples preview](https://rerun.io/preview/pr%3Aantoine%2Fpyright-config/examples)
- Loading branch information
fd78bdb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.25
.mono_points_arrow/generate_message_bundles
36642786
ns/iter (± 970447
)28838573
ns/iter (± 858677
)1.27
mono_points_arrow/decode_message_bundles
74243315
ns/iter (± 891544
)57762100
ns/iter (± 951248
)1.29
This comment was automatically generated by workflow using github-action-benchmark.