You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use findimports with namespace packages (i.e. those which don't have an __init__ in their directory tree) and I'm running into some issues.
First, the directory structure:
$ tree
.
├── Makefile
├── moat
│ └── main
│ └── __init__.py
├── README.md
├── setup.cfg
└── setup.py
There's a ../util directory alongside this one which has much the same structure:
To fix the requirement for the first touch statement I would like an option that tells findimports that it should assume that every dictionary it finds (or that's named on the command line) might be the root of a namespace package. This way the src/whatever style of laying out your source repository would still work unchanged.
Imported modules should be recognized no matter whether they're part of a namespace, i.e. the second touch should not be necessary even if I don't use that special new option.
The text was updated successfully, but these errors were encountered:
I'm trying to use
findimports
with namespace packages (i.e. those which don't have an__init__
in their directory tree) and I'm running into some issues.First, the directory structure:
There's a
../util
directory alongside this one which has much the same structure:OK. So when I run
findimports
on this, I getNow this is obviously suboptimal, as there's no "util" package and the toplevel isn't "main" either. I have to do
touch moat.__init__.py
touch ../util/moat/__init__.py
to get a more reasonable output of
To fix the requirement for the first
touch
statement I would like an option that tellsfindimports
that it should assume that every dictionary it finds (or that's named on the command line) might be the root of a namespace package. This way thesrc/whatever
style of laying out your source repository would still work unchanged.Imported modules should be recognized no matter whether they're part of a namespace, i.e. the second
touch
should not be necessary even if I don't use that special new option.The text was updated successfully, but these errors were encountered: