Skip to content
Discussion options

You must be logged in to vote

Coming back to this, using from .bar import bar as _bar is making test_package.bar a module, so we have to make bar a class again:

  1. bar = _bar - seems to work, but go to definition of test_package.bar now annoyingly leads to the bar = assignment.
  2. from .bar import bar as _bar + from .bar import bar - seems to be the best option indeed.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Andrej730
Comment options

@Andrej730
Comment options

Answer selected by Andrej730
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants