mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
py3: make gendoc use absolute_import
Fixed direct imports even the tests were not complaining.
This commit is contained in:
parent
f869841929
commit
e736fa4f52
@ -4,7 +4,11 @@
|
|||||||
where DOC is the name of a document
|
where DOC is the name of a document
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os, sys, textwrap
|
from __future__ import absolute_import
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import textwrap
|
||||||
|
|
||||||
# This script is executed during installs and may not have C extensions
|
# This script is executed during installs and may not have C extensions
|
||||||
# available. Relax C module requirements.
|
# available. Relax C module requirements.
|
||||||
@ -12,12 +16,22 @@ os.environ['HGMODULEPOLICY'] = 'allow'
|
|||||||
# import from the live mercurial repo
|
# import from the live mercurial repo
|
||||||
sys.path.insert(0, "..")
|
sys.path.insert(0, "..")
|
||||||
from mercurial import demandimport; demandimport.enable()
|
from mercurial import demandimport; demandimport.enable()
|
||||||
from mercurial import minirst
|
from mercurial import (
|
||||||
from mercurial.commands import table, globalopts
|
commands,
|
||||||
from mercurial.i18n import gettext, _
|
extensions,
|
||||||
from mercurial.help import helptable, loaddoc
|
help,
|
||||||
from mercurial import extensions
|
minirst,
|
||||||
from mercurial import ui as uimod
|
ui as uimod,
|
||||||
|
)
|
||||||
|
from mercurial.i18n import (
|
||||||
|
gettext,
|
||||||
|
_,
|
||||||
|
)
|
||||||
|
|
||||||
|
table = commands.table
|
||||||
|
globalopts = commands.globalopts
|
||||||
|
helptable = help.helptable
|
||||||
|
loaddoc = help.loaddoc
|
||||||
|
|
||||||
def get_desc(docstr):
|
def get_desc(docstr):
|
||||||
if not docstr:
|
if not docstr:
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
$ cd "$TESTDIR"/..
|
$ cd "$TESTDIR"/..
|
||||||
|
|
||||||
$ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
|
$ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
|
||||||
doc/gendoc.py not using absolute_import
|
|
||||||
doc/hgmanpage.py not using absolute_import
|
doc/hgmanpage.py not using absolute_import
|
||||||
hgext/color.py not using absolute_import
|
hgext/color.py not using absolute_import
|
||||||
hgext/eol.py not using absolute_import
|
hgext/eol.py not using absolute_import
|
||||||
|
Loading…
Reference in New Issue
Block a user