alexmojaki / alexmojaki/futurecoder
Detect import errors for auto-installing
Đang mở
- Ngôn ngữ chính
- Python
- Star
- 1.5k
- Fork
- 183
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Some packages have optional dependencies that are only required for some functions. So importing the main package automatically installs it, but using it can still lead to an error. We can detect when this has happened to help users. It requires catching exceptions in `execute`, checking the caught exception as well as the chain of `__cause__` and `__context__` for `ModuleNotFoundError`, and looking at the `name` attribute. Then we tell the user to import the missing module explicitly to 'install' it.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.