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
The current code requires that ImmutableModel must exist in a model file for it to be functional. It would be nice to include that import in the generated portion of the file if it is missing.
The text was updated successfully, but these errors were encountered:
Working through this. When I first looked at this, I had assumed that the comment block was free-floating, but I now see that comment blocks pretty much have to be associated with a code block (as per issues in the ast-types project). (Which also means that because it is possible to have more than one ModelType in a file, there will be more than one comment block.)
I have a very rudimentary pass at this which pops an import at the end of a file.
Before proceeding further, I'd like to do another refactor which will prepend the comment block only to the first added code block. This will have the side benefit of making it easier to handle pre-existing added code blocks -- look through all top-level code blocks in sequential order and remove anything at or after the block which has out delimiting comment. This is Good(tm) because if we add the ImmutableModel import, I'd rather not see that leak into the original code.
The current code requires that
ImmutableModel
must exist in a model file for it to be functional. It would be nice to include that import in the generated portion of the file if it is missing.The text was updated successfully, but these errors were encountered: