Skip to content

Cannot find reference 'v4' in '__init__.py' ? :/ #2807

Answered by nejch
stdedos asked this question in Q&A
Discussion options

You must be logged in to vote

This would be perfectly fine for mypy. I guess you're hitting a pycharm/IDEA bug where it expects that package exposed via __all__:

https://stackoverflow.com/questions/23248017/cannot-find-reference-xxx-in-init-py

You can probably work around it by importing it directly. Dummy code:

from gitlab.v4.objects import Project

def get_project(project: Project) -> None
    pass

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@stdedos
Comment options

@nejch
Comment options

@stdedos
Comment options

@nejch
Comment options

Answer selected by stdedos
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