Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

added ruff for import sorting of generated code #66

Merged

Conversation

haeussma
Copy link
Member

Refactored preservation of custom code upon code generation

Updated general strategy

  • previous code is dissected into strings, representing:
    • imports
    • globals
    • sdrdm-generated code
    • custom methods
  • imports of new and previous code are combined using ast
  • individual strings are combined, and the changes from the updated generated code added to the previous file

Changes:

  • Imports are now sorted using isort, provided by ruff
  • added support to detect async function definitions
  • added detection of generated validator patterns

@haeussma haeussma merged commit 90a475b into 63-terms-and-external-model-handling Apr 20, 2024
3 checks passed
@JR-1991 JR-1991 assigned JR-1991 and unassigned JR-1991 Apr 20, 2024
@JR-1991 JR-1991 added this to the 0.3.0 milestone Apr 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants