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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This PR modifies some build requirements and the readme is updated
This PR contains no files larger than 50 MB
Release 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.
- button to convert legacy tabs to space indents
- holds pace indentation strategy even in legacy code
- test
- clean
- button icon is just a placeholder
avidit
changed the title
Dyn 6794 python script editor convert legacy tabs to spaces
DYN-6794 python script editor convert legacy tabs to spaces
Apr 29, 2024
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.
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.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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