diff options
| author | Xavier Morel <xmo@odoo.com> | 2017-10-10 13:29:11 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2017-10-10 13:29:11 +0200 |
| commit | 40ca8557e9e25832afa40afd84124319cb71f87b (patch) | |
| tree | b4792e33b8404b75274e33e317de1183bb86e795 /doc/_extensions/autojsdoc/parser/utils.py | |
| parent | 8071742959b03020ff2cf32670bb5495804eae57 (diff) | |
[FIX] building documentation with P3
* fix P3 incompatibilities in doc/_extensions
* vendor pyjsdoc, strip out everything we're not using and make what's
left P3-compatible (upstream is not P3 compliant)
* drop undeclared dependency on attrs as it turns out not to be much
used
Diffstat (limited to 'doc/_extensions/autojsdoc/parser/utils.py')
| -rw-r--r-- | doc/_extensions/autojsdoc/parser/utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/_extensions/autojsdoc/parser/utils.py b/doc/_extensions/autojsdoc/parser/utils.py index b8b1a97e7aa..213327f6c0e 100644 --- a/doc/_extensions/autojsdoc/parser/utils.py +++ b/doc/_extensions/autojsdoc/parser/utils.py @@ -104,7 +104,7 @@ def resolve(obj, store): if obj is None: return None - if isinstance(obj, (unicode, bool, int, float)): + if isinstance(obj, (type(u''), bool, int, float)): return obj if isinstance(obj, ModuleProxy): @@ -139,11 +139,11 @@ class Namespace(Resolvable): r = super(Namespace, self).resolve(store) self.attrs = { k: resolve(v, store) - for k, v in self.attrs.iteritems() + for k, v in self.attrs.items() } return r def __getitem__(self, key): - assert isinstance(key, unicode), "%r is not a namespace key" % key + assert isinstance(key, type(u'')), "%r is not a namespace key" % key try: return self.attrs[key] except KeyError: |
