Instagram / Fixit

Advanced Python linting framework with auto-fixes and hierarchical configuration that makes it easy to write custom in-repo lint rules.
https://fixit.rtfd.io/en/latest/
Other
667 stars 62 forks source link

Allow multiple replacements from a single report? #356

Open amyreese opened 1 year ago

amyreese commented 1 year ago

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.

povilasb commented 6 months ago

Any updates on this? Ideally I'd love to be able to use AddImportsVisitor in fixit :)