From 7dd062f83552fa8ff96224c29d60bafc001d73d3 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 2 May 2017 12:07:30 +0200 Subject: [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 --- doc/_extensions/github_link.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/_extensions/github_link.py') 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) -- cgit v1.2.3