levitsky / pyteomics

Pyteomics is a collection of lightweight and handy tools for Python that help to handle various sorts of proteomics data. Pyteomics provides a growing set of modules to facilitate the most common tasks in proteomics data analysis.
http://pyteomics.readthedocs.io
Apache License 2.0
105 stars 34 forks source link

Fix warning when overriding use_index #17

Closed paretje closed 3 years ago

paretje commented 3 years ago

The warning currently doesn't work as use_index is overridden immediately when file is determined to be seeakable. This moves the warning before use_index is set.

levitsky commented 3 years ago

I made changes to _check_use_index and added some more tests for the warnings and errors it raises (https://github.com/levitsky/pyteomics/commit/e7724962febfbae60dc7e8049bb56a8339230cf4). Hopefully this addresses the issues you had. Thank you for your help!