Incorporating own code into manimlib
- 主要語言
- Python
- 星號
- 93.9k
- 分支
- 7.7k
- 平均合併
- 2 天 13 小時
- 30 天內合併 PR
- 4
描述
I would like to add functions to the `manimlib` that are callable in any new scene class.
Therefore, I created some new classes (e.g. `class_name`) with respective functions, in `function.py` and added a map to the `manimlib` folder, say `functions`. The I added a line to the `imports.py` file found in the manimlib folder:
`from manimlib.functions.function import *
`
Now when I start a new Scene, I can indeed reach those new functions, when I type
`class_name.function_name(parameters)
`
but Visual Code does not seem to recognize those. That is, they run and they work just as they should, but Visual Studio does not auto-complete or suggest the functions or parameters. Is this solvable? Because this now takes a lot of going back and forth and the whole idea to automatize this is lost.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
查看 imports.py 檔案以了解模組如何被公開。這個問題是讓自訂函式可被 VS Code 的 IntelliSense 偵測到。調查 Python 型別提示或 stub 檔案如何協助,並檢查 functions 資料夾中是否有 __init__.py。透過新增正確的 import 或修改模組結構進行測試。
由索引模型根據 Issue 內容生成。
評估
- 領域
- developer-experience
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100