extensions: avoid shadowing imported module names with exthelper methods
The previous code worked, but confused pyscripter.
--- a/hgext3rd/evolve/exthelper.py Fri Nov 30 22:10:39 2018 -0500
+++ b/hgext3rd/evolve/exthelper.py Sun Dec 02 16:52:14 2018 +0100
@@ -13,10 +13,10 @@
commands,
configitems,
extensions,
- fileset,
+ fileset as filesetmod,
registrar,
- revset,
- templatekw,
+ revset as revsetmod,
+ templatekw as templatekwmod,
)
class exthelper(object):
@@ -136,13 +136,13 @@
revsetpredicate = registrar.revsetpredicate()
for name, symbol in self._revsetsymbols:
revsetpredicate(name)(symbol)
- revset.loadpredicate(ui, 'evolve', revsetpredicate)
+ revsetmod.loadpredicate(ui, 'evolve', revsetpredicate)
filesetpredicate = registrar.filesetpredicate()
for name, symbol in self._filesetsymbols:
filesetpredicate(name)(symbol)
# TODO: Figure out the calling extension name
- fileset.loadpredicate(ui, 'exthelper', filesetpredicate)
+ filesetmod.loadpredicate(ui, 'exthelper', filesetpredicate)
templatekeyword = registrar.templatekeyword()
for name, kw, requires in self._templatekws:
@@ -150,7 +150,7 @@
templatekeyword(name, requires=requires)(kw)
else:
templatekeyword(name)(kw)
- templatekw.loadkeyword(ui, 'evolve', templatekeyword)
+ templatekwmod.loadkeyword(ui, 'evolve', templatekeyword)
for ext, command, wrapper, opts in self._extcommandwrappers:
if ext not in knownexts: