-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autogenerate the validation tables for Python #1797
Conversation
@@ -49,6 +49,15 @@ end | |||
|
|||
snake_case(sym::Symbol)::Symbol = Symbol(snake_case(String(sym))) | |||
|
|||
"Convert a string from snake_case to CamelCase." | |||
function camel_case(snake_case::AbstractString)::String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Take a look at titlecase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it should become CamelCase, I would probably go for: titlecase()
, and then replace('_' => '')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'{{n[:name]}}': [ | ||
{% for value in n[:connectivity] %} | ||
'{{ value }}', | ||
{% end %}], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good source! In this case the white space trimming doesn't do much, because after ruff formatting the code, the code looks the same.
Fixes #1779