parameters: (generated_module_filepath: str)
docstring: Takes the module code as generated by sip and sanitizes it to be compatible
      with the current standard. It replaces the original file.
  
      Currently:
        - removes all throw() specifications as they are not supported in C++ 17
  
      :param generated_module_filepath:
docstring_summary: Takes the module code as generated by sip and sanitizes it to be compatible
      with the current standard. It replaces the original file.
docstring_tokens: Takes the module code as generated by sip and sanitizes it to be compatible with the current standard . It replaces the original file .
function: def sanitize_generated_module(generated_module_filepath: str):
      """
      Takes the module code as generated by sip and sanitizes it to be compatible
      with the current standard. It replaces the original file.
  
      Currently:
        - removes all throw() specifications as they are not supported in C++ 17
  
      :param generated_module_filepath:
      """
      with open(generated_module_filepath, 'r') as sip_module_orig:
          module_code_orig = sip_module_orig.readlines()
  
      sanitized_code = []
      for line_orig in module_code_orig:
          sanitized_code.append(THROW_SPEC_RE.sub('noexcept(false)', line_orig))
  
      with open(generated_module_filepath, 'w') as sanitized_module:
          sanitized_module.write(''.join(sanitized_code))
function_tokens: def sanitize_generated_module ( generated_module_filepath : str ) : with open ( generated_module_filepath , 'r' ) as sip_module_orig : module_code_orig = sip_module_orig . readlines ( ) sanitized_code = [ ] for line_orig in module_code_orig : sanitized_code . append ( THROW_SPEC_RE . sub ( 'noexcept(false)' , line_orig ) ) with open ( generated_module_filepath , 'w' ) as sanitized_module : sanitized_module . write ( '' . join ( sanitized_code ) )