old_contents: import yaml
  
  
  class Config:
  
      def __init__(self, config_path):
          self._config_path = config_path
          self._conf_content = self._read_config_file()
          self.refresh_metadata_tables = False
          self.scrape_optional_metadata = False
          self._determine_scraping_steps()
  
      def _read_config_file(self):
          with open(self._config_path, 'r') as f:
              conf = yaml.load(f, Loader=yaml.FullLoader)
          return conf or dict()
  
      def _determine_scraping_steps(self):
          if self._conf_content.get('refresh_metadata_tables') is not None:
              self.refresh_metadata_tables = self._conf_content[
                  'refresh_metadata_tables']
          options = self.get_chosen_metadata_options()
          if len(options):
              self.scrape_optional_metadata = True
  
      def get_chosen_metadata_options(self):
          '''
          From the config contents, retrieve options that user has marked as true
          '''
          options = [
              option for option, choice in self._conf_content.items()
              if choice and option != 'refresh_metadata_tables'
          ]
          return options
  
new_contents: import yaml
  
  
  class Config:
  
      _REFRESH_OPTION = 'refresh_metadata_tables'
  
      def __init__(self, config_path):
          self._config_path = config_path
          self._conf_content = self._read_config_file()
          self.refresh_metadata_tables = False
          self.scrape_optional_metadata = False
          self._determine_scraping_steps()
  
      def _read_config_file(self):
          with open(self._config_path, 'r') as f:
              conf = yaml.load(f, Loader=yaml.FullLoader)
          return conf or dict()
  
      def _determine_scraping_steps(self):
          if self._conf_content.get(self._REFRESH_OPTION) is not None:
              self.refresh_metadata_tables = self._conf_content[
                  self._REFRESH_OPTION]
          options = self.get_chosen_metadata_options()
          if len(options):
              self.scrape_optional_metadata = True
  
      def get_chosen_metadata_options(self):
          '''
          From the config contents, retrieve options that user has marked as true
          '''
          options = [
              option for option, choice in self._conf_content.items()
              if choice and option != self._REFRESH_OPTION
          ]
          return options
  
subject: store reshresh_metadata_table string in a constant