From 096842de4474880460a1c653ea9f1fd9ffe47832 Mon Sep 17 00:00:00 2001 From: Ebag333 Date: Sat, 11 Feb 2017 09:23:23 -0800 Subject: [PATCH 1/4] Tox fixes, and catching a few things lost in the merge. --- eos/effectHandlerHelpers.py | 1 - eos/saveddata/fit.py | 3 +++ gui/builtinPreferenceViews/pyfaGeneralPreferences.py | 6 ++++-- gui/builtinStatsViews/priceViewFull.py | 1 - gui/graphFrame.py | 6 ++---- gui/mainFrame.py | 2 +- service/fit.py | 4 +++- service/price.py | 9 ++++----- 8 files changed, 17 insertions(+), 15 deletions(-) diff --git a/eos/effectHandlerHelpers.py b/eos/effectHandlerHelpers.py index 8e73d42b6..0814d901f 100644 --- a/eos/effectHandlerHelpers.py +++ b/eos/effectHandlerHelpers.py @@ -159,7 +159,6 @@ class HandledModuleList(HandledList): dummy.position = index self[index] = dummy - def toModule(self, index, mod): mod.position = index self[index] = mod diff --git a/eos/saveddata/fit.py b/eos/saveddata/fit.py index 8241f9579..135423c1f 100644 --- a/eos/saveddata/fit.py +++ b/eos/saveddata/fit.py @@ -39,6 +39,9 @@ logger = logging.getLogger(__name__) class ImplantLocation(Enum): + def __init__(self): + Enum.__init__(self) + FIT = 0 CHARACTER = 1 diff --git a/gui/builtinPreferenceViews/pyfaGeneralPreferences.py b/gui/builtinPreferenceViews/pyfaGeneralPreferences.py index d084f1b93..ffb0ff92d 100644 --- a/gui/builtinPreferenceViews/pyfaGeneralPreferences.py +++ b/gui/builtinPreferenceViews/pyfaGeneralPreferences.py @@ -11,6 +11,7 @@ from service.fit import Fit from service.price import Price from service.market import Market + class PFGeneralPref(PreferenceView): title = "General" @@ -87,10 +88,10 @@ class PFGeneralPref(PreferenceView): self.stDefaultSystem.Wrap(-1) priceSizer.Add(self.stDefaultSystem, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5) - self.chPriceSystem = wx.Choice( panel, choices=Price.systemsList.keys()) + self.chPriceSystem = wx.Choice(panel, choices=Price.systemsList.keys()) priceSizer.Add(self.chPriceSystem, 1, wx.ALL | wx.EXPAND, 5) - mainSizer.Add(priceSizer, 0, wx.ALL|wx.EXPAND, 0) + mainSizer.Add(priceSizer, 0, wx.ALL | wx.EXPAND, 0) self.sFit = Fit.getInstance() @@ -208,4 +209,5 @@ class PFGeneralPref(PreferenceView): wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) event.Skip() + PFGeneralPref.register() diff --git a/gui/builtinStatsViews/priceViewFull.py b/gui/builtinStatsViews/priceViewFull.py index 8d0dde937..0fbd24ff0 100644 --- a/gui/builtinStatsViews/priceViewFull.py +++ b/gui/builtinStatsViews/priceViewFull.py @@ -72,7 +72,6 @@ class PriceViewFull(StatsView): setattr(self, "labelPrice%s" % type.capitalize(), lbl) hbox.Add(lbl, 0, wx.ALIGN_LEFT) - def refreshPanel(self, fit): if fit is not None: self.fit = fit diff --git a/gui/graphFrame.py b/gui/graphFrame.py index 2d66c4f8e..843033c5b 100644 --- a/gui/graphFrame.py +++ b/gui/graphFrame.py @@ -42,7 +42,6 @@ except ImportError: mplImported = False - logger = logging.getLogger(__name__) @@ -69,10 +68,9 @@ class GraphFrame(wx.Frame): from matplotlib.figure import Figure graphFrame_enabled = True except ImportError: - mpl = Canvas = Figure = None + Patch = mpl = Canvas = Figure = None graphFrame_enabled = False - self.legendFix = False if not graphFrame_enabled: logger.info("Problems importing matplotlib; continuing without graphs") @@ -284,7 +282,7 @@ class GraphFrame(wx.Frame): selected_color = legend_colors[i] except: selected_color = None - legend2.append(self.Patch(color=selected_color,label=i_name),) + legend2.append(self.Patch(color=selected_color, label=i_name), ) if len(legend2) > 0: leg = self.subplot.legend(handles=legend2) diff --git a/gui/mainFrame.py b/gui/mainFrame.py index e2eb3a7c7..c55ac006e 100644 --- a/gui/mainFrame.py +++ b/gui/mainFrame.py @@ -142,7 +142,7 @@ class MainFrame(wx.Frame): @classmethod def getInstance(cls): - return cls.__instance if cls.__instance is not None else MainFrame() + return cls.__instance if cls.__instance is not None else MainFrame("") def __init__(self, title="pyfa"): self.title = title diff --git a/service/fit.py b/service/fit.py index ea05e3277..bbd6fb334 100644 --- a/service/fit.py +++ b/service/fit.py @@ -69,7 +69,9 @@ class Fit(object): "showMarketShortcuts": False, "enableGaugeAnimation": True, "exportCharges": True, - "priceSystem": "Jita"} + "openFitInNew": False, + "priceSystem": "Jita", + } self.serviceFittingOptions = SettingsProvider.getInstance().getSettings( "pyfaServiceFittingOptions", serviceFittingDefaultOptions) diff --git a/service/price.py b/service/price.py index cafe7f5d0..32e2f20bd 100644 --- a/service/price.py +++ b/service/price.py @@ -41,7 +41,7 @@ class Price(object): currentSystemId = "" @classmethod - def invalidPrices(self, prices): + def invalidPrices(cls, prices): for price in prices: price.time = 0 @@ -130,10 +130,9 @@ class Price(object): priceobj.failed = True @classmethod - def fitItemsList(self, fit): + def fitItemsList(cls, fit): # Compose a list of all the data we need & request it - typeIDs = [] - typeIDs.append(fit.ship.item.ID) + typeIDs = [fit.ship.item.ID] for mod in fit.modules: if not mod.isEmpty: @@ -151,4 +150,4 @@ class Price(object): for _ in xrange(cargo.amount): typeIDs.append(cargo.itemID) - return typeIDs \ No newline at end of file + return typeIDs From 5a4d68684ed3df4c3e451cd8679682714834cdd4 Mon Sep 17 00:00:00 2001 From: Ebag333 Date: Sat, 11 Feb 2017 09:38:10 -0800 Subject: [PATCH 2/4] Add Travis Icon --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f78438e89..0304e3105 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # pyfa -[![Join us on Slack!](https://pyfainvite.azurewebsites.net/badge.svg)](https://pyfainvite.azurewebsites.net/) +[![Join us on Slack!](https://pyfainvite.azurewebsites.net/badge.svg)](https://pyfainvite.azurewebsites.net/) [![Build Status](https://travis-ci.org/Ebag333/EVE_Gnosis.svg?branch=master)](https://travis-ci.org/Ebag333/EVE_Gnosis) ![pyfa](https://cloud.githubusercontent.com/assets/3904767/10271512/af385ef2-6ade-11e5-8f67-52b8b1e4c797.PNG) From 913f70b24ded2b206d9ede0dc19eef7419751c1f Mon Sep 17 00:00:00 2001 From: Ebag333 Date: Sat, 11 Feb 2017 09:41:26 -0800 Subject: [PATCH 3/4] Fix copy/pasta --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0304e3105..f356302e2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # pyfa -[![Join us on Slack!](https://pyfainvite.azurewebsites.net/badge.svg)](https://pyfainvite.azurewebsites.net/) [![Build Status](https://travis-ci.org/Ebag333/EVE_Gnosis.svg?branch=master)](https://travis-ci.org/Ebag333/EVE_Gnosis) +[![Join us on Slack!](https://pyfainvite.azurewebsites.net/badge.svg)](https://pyfainvite.azurewebsites.net/) [![Build Status](https://travis-ci.org/pyfa-org/Pyfa.svg?branch=master)](https://travis-ci.org/pyfa-org/Pyfa) ![pyfa](https://cloud.githubusercontent.com/assets/3904767/10271512/af385ef2-6ade-11e5-8f67-52b8b1e4c797.PNG) From 9ec6a829c2c0c5ec3ac0129c7d62bb78a09bf5dd Mon Sep 17 00:00:00 2001 From: Ebag333 Date: Sat, 11 Feb 2017 09:47:23 -0800 Subject: [PATCH 4/4] Revert the revert of the revert.....or something. --- eos/saveddata/fit.py | 3 --- gui/mainFrame.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/eos/saveddata/fit.py b/eos/saveddata/fit.py index 135423c1f..8241f9579 100644 --- a/eos/saveddata/fit.py +++ b/eos/saveddata/fit.py @@ -39,9 +39,6 @@ logger = logging.getLogger(__name__) class ImplantLocation(Enum): - def __init__(self): - Enum.__init__(self) - FIT = 0 CHARACTER = 1 diff --git a/gui/mainFrame.py b/gui/mainFrame.py index c55ac006e..e2eb3a7c7 100644 --- a/gui/mainFrame.py +++ b/gui/mainFrame.py @@ -142,7 +142,7 @@ class MainFrame(wx.Frame): @classmethod def getInstance(cls): - return cls.__instance if cls.__instance is not None else MainFrame("") + return cls.__instance if cls.__instance is not None else MainFrame() def __init__(self, title="pyfa"): self.title = title