##// END OF EJS Templates
import-checker: resolve relative imports...
import-checker: resolve relative imports "from . import X" will produce an ImportFrom ast node with .module = None. This resulted in a run-time error from attempting to concatenate None with a str. Another problem with relative imports is that the prefix may be dynamic based on the "level" attribute of the import. e.g. "from ." has level 1 and "from .." has level 2. We teach the "fromlocal" function how to cope with relative imports. Where appropriate, the consumer passes in the level so relative module names may be resolved properly.
Gregory Szorc -
r25701:1f88c0f6 default
Show More
Name Size Modified Last Commit Author
/ contrib
debian
docker
hgfixes
hgsh
macosx
plan9
vagrant
vim
win32
wix
Makefile.python Loading ...
all-revsets.txt Loading ...
base-revsets.txt Loading ...
bash_completion Loading ...
builddeb Loading ...
buildrpm Loading ...
casesmash.py Loading ...
check-code.py Loading ...
check-commit Loading ...
debugcmdserver.py Loading ...
debugshell.py Loading ...
dockerdeb Loading ...
dockerlib.sh Loading ...
dockerrpm Loading ...
dumprevlog Loading ...
editmerge Loading ...
fixpax.py Loading ...
hg-ssh Loading ...
hg-test-mode.el Loading ...
hgclient.py Loading ...
hgk Loading ...
hgperf Loading ...
hgweb.fcgi Loading ...
hgweb.wsgi Loading ...
import-checker.py Loading ...
logo-droplets.svg Loading ...
memory.py Loading ...
mercurial.el Loading ...
mercurial.spec Loading ...
mq.el Loading ...
packagelib.sh Loading ...
perf.py Loading ...
pylintrc Loading ...
python-hook-examples.py Loading ...
revsetbenchmarks.py Loading ...
simplemerge Loading ...
synthrepo.py Loading ...
tcsh_completion Loading ...
tcsh_completion_build.sh Loading ...
undumprevlog Loading ...
xml.rnc Loading ...
zsh_completion Loading ...