podhmo / python-node-semver

python version of node-semver
MIT License
21 stars 15 forks source link

more gentle error handling #29

Closed podhmo closed 5 years ago

podhmo commented 5 years ago

26

This is ad hoc fix.

from semver import max_satisfying

print(max_satisfying([b"1.0.0"], "1.0.0"))
# semver.InvalidTypeIncluded: must be str, but b'1.0.0'

(typing (#27) is more better, conceptually?)