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
As mentioned in #170, it can be useful to provide more than one suggested replacement in a single report, for things like adding imports associated with the primary auto-fix. Currently this requires multiple separate calls to self.report(), each with its own node and replacement, which would then be offered to the user as seemingly-unrelated changes and fixes.
Let’s consider allowing reports to offer multiple fixes that get applied as a single operation.
The text was updated successfully, but these errors were encountered:
I'm new to libCST and Fixit in general, so I may be doing something wrong, but it seems like even if using multiple report calls currently, that if the top-level Module is modified to add another Import to its body, that FixIt will forego traversing the Module's children since the Module has changes to it (see here). This results in users being prompted for multiple changes for a given file, but only the import change ever gets applied.
Unless there is another way to add the import to global scope without modifying the Module object itself, I think this isn't possible with the current design.
Edit: I see there is a different issue reported for this. Placing link here for others to find. #358
As mentioned in #170, it can be useful to provide more than one suggested replacement in a single report, for things like adding imports associated with the primary auto-fix. Currently this requires multiple separate calls to
self.report()
, each with its own node and replacement, which would then be offered to the user as seemingly-unrelated changes and fixes.Let’s consider allowing reports to offer multiple fixes that get applied as a single operation.
The text was updated successfully, but these errors were encountered: