PatrickAlphaC / aave_brownie_py_freecode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

from brownie import interface - does not exist

FBosler opened this issue · comments

To preface my question, I installed brownie via pip in a virtual environment, because I have a lot of projects and want to keep them separated.
I have not used pipx before, but I figure it's somewhat global, which would then cause problems if I had different brownie versions. Ultimately I think, it should not make a difference.

Anyway, long story short for me from brownie import interface does not work, as brownie does not export `interface. It also seems to never have done so

Any idea whats up with this? I'd love to get a better understanding of the inner workings of brownie (also because my IDE does not recognize the contract imports - those however work at least)

I think I found it ... I really don't love the fact that there is so much black magic happening :D
The weird imports seem to be happening here

I wonder if this could be done a little bit more dynamic, so that the IDE picks up on this too and that we can get intellisense.

hmm... Thanks! Were you able to fix it? Perhaps this could be an improvement to the brownie package...

Could be a huge improvement I think. I am using PyCharm and really would love to have IntelliSense available (because so far most bugs I managed to almost pull my hair out over were typos).
Ultimately the import worked when I ran the script via brownie run xxx but that's not really satisfying to me. I am thinking about writing some for of watcher and compiling on save and then exposing the python readable ABI.

How come you are using Visual Studio Code for Python?

Cheers

Ultimately, it comes down to the number of technologies I use. I use a lot.

If you find more success with pycharm, that's great! But I bounce around a lot of technologies, so I'm used to a text editor that is good at them all.

Closing this issue for now, would love to see some improvements in a PR though!