-
Notifications
You must be signed in to change notification settings - Fork 210
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
Update ToSnakeCase so it wouldn't return "image_u_r_l" for "imageURL" #4608
base: main
Are you sure you want to change the base?
Conversation
…and not "image_u_r_l"
Add tests back
@microsoft-github-policy-service agree |
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.
Thanks for the contribution! Can you please also add an entry in the changelog (unreleased, changed)
Updated changelog |
Pull Request is not mergeable
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.
@hvuhsg Thanks for the contribution.
Any chance you can double check the failing tests as well?
I checked the tests, It seems to have many dependencies for this format "4XX" -> "4_x_x" and I do not have the expertise or the time to update them. I will not be continuing this PR I hop you could take it from here. |
@andrueastman it seems the current change would impact the way namespaces are generated, and subsequently the imports. |
@baywet Looking at the diff here https://github.com/microsoftgraph/msgraph-sdk-python/compare/main..v1.0/pipelinebuild/147301 We're going to change
It may probably make sense to change this to an overload and limit this to variable name scenarios and track this for 2.0 change similar to #2495. |
@andrueastman Thanks for validating this! |
The idea would be essentially to be
|
@andrueastman the named argument syntax makes changing the parameter names a breaking change my suggestion at this point would be to leave this PR open in draft until we start working on a v2 |
fixes #4531
Currently any filename and variable name that is converted to snake case get a separator (default "_") before every uppercase letter excluding some edge cases.
So having the filename "NotrixSDK" will become "notrix_s_d_k" and not the desired "notrix_sdk".
This PR is fixing it by checking if the previous letter is upper case and in this case it does not add the separator.