class_docstr: Yaml file class
class_docstr_tok: ["Yaml","file","class"]
code: def validate(self):
      # print('Validating ' + str(self._path.replace('\\', '/').split('/')[-1:][0]))
      if self.data is None:
          print("\n[ERROR] File: " + self._path)
          print("This file has no data:")
          exit(0)
      for module in self.data:
          if "module_name" in module and module["module_name"] is None:
              print("\n[ERROR] File: " + self._path)
              print("'module_name' is empty in:")
              exit(0)
          if "classes" in module:
              if not module["classes"]:
                  print("\n[ERROR] File: " + self._path)
                  print("'classes' is empty in:")
                  exit(0)
              for cl in module["classes"]:
                  if "class_name" in cl and cl["class_name"] is None:
                      print("\n[ERROR] File: " + self._path)
                      print("'class_name' is empty in:")
                      exit(0)
                  if (
                      "instance_variables" in cl
                      and cl["instance_variables"]
                  ):
                      for iv in cl["instance_variables"]:
                          if "var_name" not in iv:
                              print("\n[ERROR] File: " + self._path)
                              print(
                                  "'var_name' not found inside 'instance_variables' of class: "
                                  + cl["class_name"]
                              )
                              exit(0)
                          if (
                              "var_name" in iv
                              and iv["var_name"] is None
                          ):
                              print("\n[ERROR] File: " + self._path)
                              print("'var_name' is empty in:")
                              exit(0)
                  if "methods" in cl and cl["methods"]:
                      for met in cl["methods"]:
                          if "def_name" not in met:
                              print("\n[ERROR] File: " + self._path)
                              print(
                                  "'def_name' not found inside 'methods' of class: "
                                  + cl["class_name"]
                              )
                              exit(0)
                          if (
                              "def_name" in met
                              and met["def_name"] is None
                          ):
                              print("\n[ERROR] File: " + self._path)
                              print("'def_name' is empty in:")
                              exit(0)
                          if "params" in met and met["params"]:
                              for param in met["params"]:
                                  if "param_name" not in param:
                                      print(
                                          "\n[ERROR] File: "
                                          + self._path
                                      )
                                      print(
                                          "'param_name' not found inside 'params' of class: "
                                          + cl["class_name"]
                                      )
                                      exit(0)
                                  if (
                                      "param_name" in param
                                      and param["param_name"] is None
                                  ):
                                      print(
                                          "\n[ERROR] File: "
                                          + self._path
                                      )
                                      print("'param_name' is empty in:")
                                      exit(0)
                                  if (
                                      "type" in param
                                      and param["type"] is None
                                  ):
                                      print(
                                          "\n[ERROR] File: "
                                          + self._path
                                      )
                                      print("'type' is empty in:")
                                      exit(0)
  
imports: import os
  import yaml
  import re
  import doc_gen_snipets
label_desc: Use image node_id 2 for calling the YamlFile obj's underlying member method code with example usage: obj.validate() without return types