Incorporating own code into manimlib
- Linguagem predominante
- Python
- Estrelas
- 93.9k
- Forks
- 7.7k
- Merge médio
- 2d 13h
- PRs com merge (30d)
- 4
Descrição
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.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
Veja o arquivo imports.py para entender como os módulos são expostos. O problema é sobre tornar funções personalizadas descobertas pelo IntelliSense do VS Code. Investigue como type hints de Python ou arquivos stub podem ajudar, e verifique se existe um __init__.py na pasta functions. Teste adicionando imports apropriados ou modificando a estrutura do módulo.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Domínio
- developer-experience
- Tipo de issue
- Funcionalidade
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 45/100