I installed ruff today and messed around a little with its check command. I found one message in particular confusing/useless:
[I001] Import block is un-sorted or un-formatted
As far as I could tell, it didn’t like any of my blocks of import statements. When I looked it up, I was still confused. Here’s one block of imports it complained about in a small script:
import argparse
import os
import pickle # nosec
import sys
The imports are sorted as far as I can tell and all are stdlib modules. I don’t understand what it’s complaining about at all. The script has a blank line before and after the imports.
I poked around, but found nothing in the way of obvious answers or pointers to any sort of help community, so here I am. Pointers and/or explanations appreciated.
Thanks, not willing to turn over (re)formatting to a tool I’ve never used before. I’ve been using one version of Emacs’ python-mode or another for ~30 years. I’ll figure out how to suppress what to me are spurious messages.