Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _create_parser(self):
if self._use_index:
return _MGFParser(self.source_file, read_charges=False,
convert_arrays=1, encoding=self.encoding)
simple_reader = mgf.MGF(
self.source_file, read_charges=False,
convert_arrays=1, encoding=self.encoding)
simple_reader.index = OffsetIndex()
return simple_reader