From 01be84bf76883a941c4a795f5216a8119127df84 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 30 May 2018 14:33:24 +0200 Subject: [PATCH] [FIX] _extensions: p3 compatibility (7) `basestring` can be simplified to `str` here, and should work in both Python versions. --- _extensions/github_link.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_extensions/github_link.py b/_extensions/github_link.py index 806d2b4ae..e30ae3e5b 100644 --- a/_extensions/github_link.py +++ b/_extensions/github_link.py @@ -99,7 +99,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, str) else source_suffix[0] # FIXME: odoo/odoo has a doc/ prefix which is incorrect for this # project, how to unify? Add new setting? context['github_link'] = lambda mode='edit': make_github_link(