Closed ranebrown closed 7 months ago
Hello there, thanks for the PR! I think this is in general a good idea, and in particular helpful to keep contributions from multiple users consistent. However, it does seem to reduce readability in a few cases. I quickly highlighted a couple patterns, there are probably a few others. If you're familiar with ruff and its options, it'd be great if you could help figure out those cases at least, and I'd be happy to take it in. Thanks again!
I did a bit more digging and the option set is pretty limited. The ruff formatter pretty much matches black which intentionally gives you very few options to change so all code formatted with it should look the same. For specific cases this can be done:
# fmt: off
code_here()
...
#fmt: on
I would argue consistency across the board is better but let me know if you want formatting disabled on the sections you pointed out.
Thanks for looking this up. You make a good point, and I agree overall. I still feel like target_accounts_map
should be the one exception and remain unformatted, but I'm fine with leaving it to ruff on everything else for the sake of consistency.
f you're okay making the change to exclude those blocks alone, I'd be happy to take it in. Thank you!
Made a few more changes:
transaction_type_map
and header_map
.Looks great, I appreciate the PR and the changes! This was long needed. Merged. Thank you!
Adds a job to check formatting and formats all existing files with ruff.
Config options if you want anything changed from the defaults.