yhat / yhat-client

Python client for ScienceOps
https://www.yhat.com/products/scienceops
29 stars 9 forks source link

Handle relative imports for users #21

Open rosskipp opened 7 years ago

rosskipp commented 7 years ago

We don't seem to handle relative imports very well. This can lead to confusion and frustration.

Currently, if someone does this, we won't get the import (TODO - not sure this is exactly right) :

from package.something.whatever import NewInstance

class MyObject(param1, param2)
    ...
    ...

NewInstance = MyObject(param1, param2)

They have to do this instead:


from package.something.wahtever import MyObject

NewInstance = MyObject(param1, param2)