I have the following setup:
animals
- __init__.py
- main.py
- pets.py
* class Dog
If I do from pets import Dog
from main.py, I get a linter warning on the latest versions of pylint, flake8, and bandit. Intellisense recommends I do from animals.pets import Dog
from main.py but this gives me ModuleNotFoundError: No module named 'pets'
.
At this point it is really just an annoyance since I can ignore the linter warnings but I would really like to get this fixed.
EDIT:
I have tried the following things from main.py
from .pets import Dog
from . import pets.Dog
import pets.Dog
and many more. Every single one gives me either a linter warning or throws an error.