from traits.api import HasTraits

import json

class Instrument(HasTraits):
	"""
	Main super-class for all instruments.
	"""

	def get_settings(self):
		return self.__getstate__()

	def set_settings(self, settings):
		for key,value in settings.items():
			setattr(self, key, value)

from traits.api import HasTraits, Bool

import json

class Instrument(HasTraits):
	"""
	Main super-class for all instruments.
	"""
	enabled = Bool(True, desc='Whether the unit is used/enabled.')

	def get_settings(self):
		return self.__getstate__()

	def set_settings(self, settings):
		for key,value in settings.items():
			setattr(self, key, value)

Add enabled to top-level instrument class.
Add enabled to top-level instrument class.

- from traits.api import HasTraits
+ from traits.api import HasTraits, Bool
  
  import json
  
  class Instrument(HasTraits):
  	"""
  	Main super-class for all instruments.
  	"""
+ 	enabled = Bool(True, desc='Whether the unit is used/enabled.')
  
  	def get_settings(self):
  		return self.__getstate__()
  
  	def set_settings(self, settings):
  		for key,value in settings.items():
  			setattr(self, key, value)
  
Add enabled to top-level instrument class.
## Code Before:
from traits.api import HasTraits

import json

class Instrument(HasTraits):
	"""
	Main super-class for all instruments.
	"""

	def get_settings(self):
		return self.__getstate__()

	def set_settings(self, settings):
		for key,value in settings.items():
			setattr(self, key, value)

## Instruction:
Add enabled to top-level instrument class.
## Code After:
from traits.api import HasTraits, Bool

import json

class Instrument(HasTraits):
	"""
	Main super-class for all instruments.
	"""
	enabled = Bool(True, desc='Whether the unit is used/enabled.')

	def get_settings(self):
		return self.__getstate__()

	def set_settings(self, settings):
		for key,value in settings.items():
			setattr(self, key, value)
