mirror of
https://github.com/odoo/documentation.git
synced 2026-01-04 10:46:04 +07:00
[CLN] core: upgrade to python 3.6
& sort imports
closes odoo/documentation#2975
X-original-commit: 57784a2f90
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
@@ -19,9 +19,10 @@ Notes
|
||||
* explicitly imports ``odoo``, so useless for anyone else
|
||||
"""
|
||||
|
||||
import inspect
|
||||
import importlib
|
||||
import inspect
|
||||
import os.path
|
||||
|
||||
import werkzeug
|
||||
|
||||
|
||||
@@ -60,7 +61,7 @@ def setup(app):
|
||||
try:
|
||||
obj_source_path = inspect.getsourcefile(obj)
|
||||
_, line = inspect.getsourcelines(obj)
|
||||
except (TypeError, IOError):
|
||||
except (TypeError, OSError):
|
||||
# obj doesn't have a module, or something
|
||||
return None
|
||||
|
||||
@@ -115,4 +116,4 @@ def add_doc_link(app, pagename, templatename, context, doctree):
|
||||
source_suffix = app.config.source_suffix
|
||||
source_suffix = next(iter(source_suffix))
|
||||
context['github_link'] = lambda mode='edit': make_github_link(
|
||||
app, 'content/%s%s' % (pagename, source_suffix), mode=mode)
|
||||
app, f'content/{pagename}{source_suffix}', mode=mode)
|
||||
|
||||
Reference in New Issue
Block a user