Closed ddundo closed 3 months ago
Thanks for this @ddundo. This linter option seems a bit over-the-top to me, to be honest. But I have a few suggestions that could improve things a bit.
Thanks @jwallwork23 - very good points! And before I address them, would you prefer if I added C901 to the ignore list if you think it's over-the-top? Then I could revert back to how it was if you'd like
Thanks @jwallwork23 - very good points! And before I address them, would you prefer if I added C901 to the ignore list if you think it's over-the-top? Then I could revert back to how it was if you'd like
No it's okay, let's stick with it. It's better to go with linter recommendations rather than ignoring them.
Thanks @jwallwork23 - this tidies it up nicely :) ready for review again
Closes #108.
After #120, the remaining linting errors are:
This PR addresses all of them apart from the final one, to which I added
noqa: C901
. The complexity mostly comes from theif isinstance
checks so I don't think it's that bad to begin with. And I guess I could replace those withassert
but I would rather not do that. @jwallwork23 do you see a nice way to simplify it please? :)