Skip to content

Add code to handle calculation options#14

Merged
DrPaulSharp merged 9 commits intoRascalSoftware:mainfrom
DrPaulSharp:options
Oct 4, 2023
Merged

Add code to handle calculation options#14
DrPaulSharp merged 9 commits intoRascalSoftware:mainfrom
DrPaulSharp:options

Conversation

@DrPaulSharp
Copy link
Copy Markdown
Collaborator

No description provided.

model_3 = model(name='Given Name')
model_4 = model()

assert model_1.name == "New " + model_name + " 1"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend using f-string instead of the concat

test_attribute.set_fields(0, **{field: 'undefined'})
assert print_str.getvalue() == (f'\033[31m1 validation error for Project\n Value error, The value "undefined" in '
f'the "{field}" field of "{class_list}" must be defined in '
f'"{RAT.project.values_defined_in[class_list+"."+field]}".\033[0m\n')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer nested f-string over concat but that my preference

@DrPaulSharp DrPaulSharp merged commit c580435 into RascalSoftware:main Oct 4, 2023
@DrPaulSharp DrPaulSharp deleted the options branch October 4, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants