Skip to content

Commit

Permalink
Move imports around to make plugins testable without the GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
viiru- committed Jun 27, 2024
1 parent 2023bec commit 764ec44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/garmin-tcxv2/garmin-tcxv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import os
from lxml import etree
from pytrainer.lib.xmlUtils import XMLParser
from pytrainer.gui.dialogs import fileChooserDialog, guiFlush
from pytrainer.core.activity import Activity
from sqlalchemy.orm import exc

Expand All @@ -48,6 +47,7 @@ def getConfValue(self, confVar):
def run(self):
logging.debug(">>")
# able to select multiple files....
from pytrainer.gui.dialogs import fileChooserDialog, guiFlush
selectedFiles = fileChooserDialog(title="Choose a TCX file (or files) to import", multiple=True).getFiles()
guiFlush()
importfiles = []
Expand Down
2 changes: 1 addition & 1 deletion pytrainer/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

from .lib.xmlUtils import XMLParser

from .gui.windowplugins import WindowPlugins

class Plugins:
def __init__(self, data_path = None, parent = None):
Expand Down Expand Up @@ -68,6 +67,7 @@ def importClass(self, pathPlugin):

def managePlugins(self):
pluginsList = self.getPluginsList()
from .gui.windowplugins import WindowPlugins
windowplugins = WindowPlugins(self.data_path, self)
windowplugins.setList(pluginsList)
windowplugins.run()
Expand Down

0 comments on commit 764ec44

Please sign in to comment.