diff options
| author | Adrian Torres <adt@odoo.com> | 2018-11-08 15:27:30 +0000 |
|---|---|---|
| committer | Adrian Torres <adt@odoo.com> | 2018-11-29 09:28:17 +0000 |
| commit | 52f5528cfb6d1152ee226e268247dc685a8ba329 (patch) | |
| tree | b44ecfa477b50dd3e488f09f623eecc8bc8e9d7d /doc/_extensions/github_link.py | |
| parent | e5c864a596b72515837f0ed1e07550398ecc1ab0 (diff) | |
[REF] *: replace deprecated pycompat helpers for builtins
This commit replaces calls to pycompat helpers that were intended for
python 2 <-> python 3 interoperability for python 3 builtins, as python
2 is no longer officially supported by Odoo.
This includes:
* calls to imap/izip/ifilter replaced by map/zip/filter
* uses of text_type replaced by str
* uses of unichr replaced by chr
* calls to implements_to_string, implements_iterator removed
* string_types and integer_types replaced by str, int respectively
* calls to to_native replaced by calls to to_text
This is done in preparation to the removal of these deprecated helpers
in the following commit.
Diffstat (limited to 'doc/_extensions/github_link.py')
| -rw-r--r-- | doc/_extensions/github_link.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/doc/_extensions/github_link.py b/doc/_extensions/github_link.py index 72d51bfeb60..8f7a0084039 100644 --- a/doc/_extensions/github_link.py +++ b/doc/_extensions/github_link.py @@ -4,8 +4,6 @@ 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 @@ -100,7 +98,7 @@ def add_doc_link(app, pagename, templatename, context, doctree): # in 1.3 source_suffix can be a list # in 1.8 source_suffix can be a mapping # FIXME: will break if we ever add support for !rst markdown documents maybe - if not isinstance(source_suffix, pycompat.string_types): + if not isinstance(source_suffix, str): source_suffix = next(iter(source_suffix)) # can't use functools.partial because 3rd positional is line not mode context['github_link'] = lambda mode='edit': make_github_link( |
