-
Notifications
You must be signed in to change notification settings - Fork 635
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
DYN-6794 python script editor convert legacy tabs to spaces #15179
DYN-6794 python script editor convert legacy tabs to spaces #15179
Conversation
- button to convert legacy tabs to space indents - holds pace indentation strategy even in legacy code - test - clean - button icon is just a placeholder
src/Libraries/PythonNodeModels/Properties/Resources.Designer.cs
Outdated
Show resolved
Hide resolved
UI Smoke TestsTest: success. 2 passed, 0 failed. |
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.
LGTM with a few comments
Waiting for PR checks before merging |
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.
Running the job again.
https://master-5.jenkins.autodesk.com/job/Dynamo/job/DynamoSelfServe/job/pullRequestValidation/15991/testReport/ looks good. Only 1 test GraphNodeManagerViewExtensionTests.ContainsEmptyListOrNullTest has failed which was recently changed to fix the flaky behavior. |
Can I know what happen with the prevous script ? So it will automation or show the issue when user keep use old dynamo python script ? I don't want to see the same headache as Ironpython 2.7 converts to Cpython3, causing the sets to break. |
Hi @chuongmep My understanding is that there is no automation here, so if you open a legacy script, it should not be affected without user manually clicking on that new convert button. |
Purpose
PR to address https://jira.autodesk.com/browse/DYN-6794 & #15033 .
Added button in the Python script editor to convert tab indentations from legacy Python code to space indentations.
Includes test.
Declarations
Check these if you believe they are true
*.resx
filesRelease Notes
Added button in Python to convert tab indentations to space indentations so that users can run legacy code.
Icon for the convert button is a place holder.
PS: Tried a few options where we suppress the conversion to spaces in PythonIndentationStrategy but ultimately they all lead to problems beyond just pasting code with tab indentations. Preserving the current strategy and converting legacy code to the modern convention seem a better solution.
Reviewers
@dnenov
@reddyashish
FYIs
@Amoursol