Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def write_file(self, yaml_file):
yaml_file.seek(0)
yaml_file.write( pyyaml.dump(self.yaml_to_write, default_flow_style = False, allow_unicode = True, encoding = None, width = 1000) )
yaml_file.truncate()