Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def setFileFormat(_file_format):
"""
:param file_format: The file format to use.
:return: None
"""
global file_format # must declare that we're assigning to a global variable
if _file_format == FileFormats.JSON.value:
file_format = FileFormats.JSON.value
elif _file_format == FileFormats.NTRIPLES.value:
file_format = FileFormats.NTRIPLES.value
else:
file_format = FileFormats.RDFXML.value
def setFileFormat(_file_format):
"""
:param file_format: The file format to use.
:return: None
"""
global file_format # must declare that we're assigning to a global variable
if _file_format == FileFormats.JSON.value:
file_format = FileFormats.JSON.value
elif _file_format == FileFormats.NTRIPLES.value:
file_format = FileFormats.NTRIPLES.value
else:
file_format = FileFormats.RDFXML.value
def setFileFormat(_file_format):
"""
:param file_format: The file format to use.
:return: None
"""
global file_format # must declare that we're assigning to a global variable
if _file_format == FileFormats.JSON.value:
file_format = FileFormats.JSON.value
elif _file_format == FileFormats.NTRIPLES.value:
file_format = FileFormats.NTRIPLES.value
else:
file_format = FileFormats.RDFXML.value