mapping-commons / sssom-py

Python toolkit for SSSOM mapping format
https://mapping-commons.github.io/sssom-py/index.html#
MIT License
49 stars 12 forks source link

Add additional typecheck to curie validation #542

Closed matentzn closed 3 months ago

matentzn commented 3 months ago

Due to the lack of type safety, i can pass a non string to the _is_curie method, which causes the method to fail hard when its trying to do regex matching.

Here, i add an additional safety net around the matching processing, making sure the value is not None, and is indeed a string (and not a number or some other kind of non-string).