summaryrefslogtreecommitdiff
path: root/doc/_extensions/github_link.py
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2017-05-02 12:07:30 +0200
committerOlivier Dony <odo@openerp.com>2017-08-20 23:25:54 +0200
commit7dd062f83552fa8ff96224c29d60bafc001d73d3 (patch)
treed507e27e9d5daa91981e04b5aa81a802a9854a8d /doc/_extensions/github_link.py
parent3824b5dcc13678d3985ad45ac21dcf9ac9202c20 (diff)
[FIX] P3: text model types
* remove references to basestring & unicode (use relevant pycompat helpers) * remove some str calls (either entirely or replaced by relevant helper, either text or native) * use better API to avoid unnecessary conversions * remove some XML declarations in views
Diffstat (limited to 'doc/_extensions/github_link.py')
-rw-r--r--doc/_extensions/github_link.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/_extensions/github_link.py b/doc/_extensions/github_link.py
index d3e5d61c28e..155e4083025 100644
--- a/doc/_extensions/github_link.py
+++ b/doc/_extensions/github_link.py
@@ -4,6 +4,8 @@ import os.path
from werkzeug import urls
+from odoo.tools import pycompat
+
"""
* adds github_link(mode) context variable: provides URL (in relevant mode) of
current document on github
@@ -99,7 +101,7 @@ def add_doc_link(app, pagename, templatename, context, doctree):
# in Sphinx 1.3 it's possible to have mutliple source suffixes and that
# may be useful in the future
source_suffix = app.config.source_suffix
- source_suffix = source_suffix if isinstance(source_suffix, basestring) else source_suffix[0]
+ source_suffix = source_suffix if isinstance(source_suffix, pycompat.string_types) else source_suffix[0]
# can't use functools.partial because 3rd positional is line not mode
context['github_link'] = lambda mode='edit': make_github_link(
app, 'doc/%s%s' % (pagename, source_suffix), mode=mode)