Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/commitizen-tools/commitizen
/ from_str
Method
from_str
commitizen/exceptions.py:45–48 ·
view source on GitHub ↗
(cls, value: str)
Source
from the content-addressed store, hash-verified
43
44
@classmethod
45
def
from_str(cls, value: str) -> ExitCode:
46
if
value.isdecimal():
47
return
cls(int(value))
48
return
cls[value.strip()]
49
50
51
class
CommitizenException(Exception):
Callers
5
test_from_str_with_decimal
Function · 0.80
test_from_str_with_enum_name
Function · 0.80
test_from_str_with_whitespace
Function · 0.80
test_from_str_with_invalid_values
Function · 0.80
exit_code_from_str_or_skip
Function · 0.80
Calls
no outgoing calls
Tested by
4
test_from_str_with_decimal
Function · 0.64
test_from_str_with_enum_name
Function · 0.64
test_from_str_with_whitespace
Function · 0.64
test_from_str_with_invalid_values
Function · 0.64