You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"version string can only have 1 '-', but contains %s"%len(parts)
)
If there is a malformed version spam-eggs-spam, this will emit version string can only have 1 '-', but contains 3
Which is misleading, since there are only 2 hyphens, not 3.
While changing this, I think I'd prefer to use try-except ValueError around the unpacking of parts rather than have a dedicated != 2 check so that could be changed too.
The text was updated successfully, but these errors were encountered:
It just avoids having to write an explicit check (so I think it makes clearer the connection between the check and the unpacking step that follows), but really it's a style/preference thing so I'll leave it be.
Another nitpicky issue with these error messages:
pins-python/pins/versions.py
Lines 67 to 73 in d215a8c
If there is a malformed version
spam-eggs-spam
, this will emitversion string can only have 1 '-', but contains 3
Which is misleading, since there are only 2 hyphens, not 3.
While changing this, I think I'd prefer to use
try-except ValueError
around the unpacking ofparts
rather than have a dedicated!= 2
check so that could be changed too.The text was updated successfully, but these errors were encountered: