sq inspect code is hard to follow and change
The code for sq inspect
mixes logic and formatting in ways that makes it unnecessarily hard to follow the logic, and hard to change the output formatting. I'll prepare an MR to refactor this into code that's tidier.