From 288ef1ced93366dd537ad6a098cf8ec96b46a5ad Mon Sep 17 00:00:00 2001 From: Akim Juillerat Date: Thu, 10 Oct 2019 15:59:42 +0200 Subject: [PATCH] Rename file to attend TODO comment --- server_environment/__init__.py | 9 ++------- server_environment/models/server_env_mixin.py | 2 +- server_environment/{serv_config.py => server_env.py} | 0 3 files changed, 3 insertions(+), 8 deletions(-) rename server_environment/{serv_config.py => server_env.py} (100%) diff --git a/server_environment/__init__.py b/server_environment/__init__.py index aab9a42..a098413 100644 --- a/server_environment/__init__.py +++ b/server_environment/__init__.py @@ -18,10 +18,5 @@ # ############################################################################## from . import models -# TODO when migrating to 12, fix the import of serv_config by renaming the -# file? -# Add an alias to access to the 'serv_config' module as it is shadowed -# in the following line by an import of a variable with the same name. -# We can't change the import of serv_config for backward compatibility. -from . import serv_config as server_env -from .serv_config import serv_config, setboolean +from . import server_env +from .server_env import serv_config, setboolean diff --git a/server_environment/models/server_env_mixin.py b/server_environment/models/server_env_mixin.py index 3b561b1..0227bfa 100644 --- a/server_environment/models/server_env_mixin.py +++ b/server_environment/models/server_env_mixin.py @@ -8,7 +8,7 @@ from functools import partialmethod from lxml import etree from odoo import api, fields, models -from ..serv_config import serv_config +from ..server_env import serv_config _logger = logging.getLogger(__name__) diff --git a/server_environment/serv_config.py b/server_environment/server_env.py similarity index 100% rename from server_environment/serv_config.py rename to server_environment/server_env.py