Mercurial > public > mercurial-scm > hg-stable
diff doc/check-seclevel.py @ 28965:98153441c8cc
py3: make check-seclevel use absolute_import
Also fixed direct symbol imports even the tests were not complaining.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 17 Apr 2016 00:14:42 +0530 |
parents | 1b8c7d59be43 |
children | d83ca854fa21 |
line wrap: on
line diff
--- a/doc/check-seclevel.py Thu Apr 14 15:20:11 2016 +0000 +++ b/doc/check-seclevel.py Sun Apr 17 00:14:42 2016 +0530 @@ -2,18 +2,26 @@ # # checkseclevel - checking section title levels in each online help document -import sys, os +from __future__ import absolute_import + import optparse +import os +import sys # import from the live mercurial repo os.environ['HGMODULEPOLICY'] = 'py' sys.path.insert(0, "..") from mercurial import demandimport; demandimport.enable() -from mercurial.commands import table -from mercurial.help import helptable -from mercurial import extensions -from mercurial import minirst -from mercurial import ui as uimod +from mercurial import ( + commands, + extensions, + help, + minirst, + ui as uimod, +) + +table = commands.table +helptable = help.helptable level2mark = ['"', '=', '-', '.', '#'] reservedmarks = ['"']