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
# TODO: As part of redesign of parse methods in Model, consider to make sure that parsers where
roman_numerals= ('I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X')
# TODO: As part of redesign of parse methods in Model, consider to make sure that parsers where# the typing allows output can be directly funnelled back as input, but which still change# the data, can be revalidated without altering the state. An example of such a Model is# the RomanNumeral Model below, given that the if statement where removed.classRomanNumeral(Model[str]):
"""A roman numeral"""@classmethoddef_parse_data(cls, data: str) ->str:
ifdatainroman_numerals:
returndatanumber=int(data)
assert0<number<=10returnroman_numerals[number-1]
The text was updated successfully, but these errors were encountered:
the typing allows output can be directly funnelled back as input, but which still change
the data, can be revalidated without altering the state. An example of such a Model is
the RomanNumeral Model below, given that the if statement where removed.
omnipy/tests/data/test_model.py
Line 4131 in 86e1ee9
The text was updated successfully, but these errors were encountered: