MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / UpdateSettings

Class UpdateSettings

service/settings.py:323–351  ·  view source on GitHub ↗

Settings used by update notification

Source from the content-addressed store, hash-verified

321
322
323class UpdateSettings:
324 """
325 Settings used by update notification
326 """
327 _instance = None
328
329 @classmethod
330 def getInstance(cls):
331 if cls._instance is None:
332 cls._instance = UpdateSettings()
333
334 return cls._instance
335
336 def __init__(self):
337 # Settings
338 # Updates are completely suppressed via network settings
339 # prerelease - If True, suppress prerelease notifications
340 # version - Set to release tag that user does not want notifications for
341 serviceUpdateDefaultSettings = {"prerelease": True, 'version': None}
342 self.serviceUpdateSettings = SettingsProvider.getInstance().getSettings(
343 "pyfaServiceUpdateSettings",
344 serviceUpdateDefaultSettings
345 )
346
347 def get(self, type):
348 return self.serviceUpdateSettings[type]
349
350 def set(self, type, value):
351 self.serviceUpdateSettings[type] = value
352
353
354class EsiSettings:

Callers 1

getInstanceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected