Optimize imports

This commit is contained in:
nemunaire 2015-02-21 13:51:40 +01:00 committed by nemunaire
commit e588c30044
29 changed files with 730 additions and 924 deletions

View file

@ -14,9 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from nemubot.tools.xmlparser import module_state
class Abstract:
"""Abstract implementation of a module data store, that always return an
@ -38,6 +35,7 @@ class Abstract:
The loaded data
"""
from nemubot.tools.xmlparser import module_state
return module_state.ModuleState("nemubotstate")
def save(self, module, data):

View file

@ -17,7 +17,6 @@
import os
from nemubot.datastore.abstract import Abstract
from nemubot.tools.xmlparser import parse_file
class XML(Abstract):
@ -66,6 +65,7 @@ class XML(Abstract):
data_file = self._get_data_file_path(module)
if os.path.isfile(data_file):
from nemubot.tools.xmlparser import parse_file
return parse_file(data_file)
else:
return Abstract.load(self, module)